openatc-components 0.3.37 → 0.3.39

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 (497) 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/Untitled-1.json +14753 -0
  8. package/build/build.js +41 -41
  9. package/build/check-versions.js +54 -54
  10. package/build/package.config.js +58 -58
  11. package/build/package.dev.config.js +107 -107
  12. package/build/package.prod.config.js +160 -160
  13. package/build/utils.js +101 -101
  14. package/build/vue-loader.conf.js +22 -22
  15. package/build/webpack.base.conf.js +114 -114
  16. package/build/webpack.dev.conf.js +95 -95
  17. package/build/webpack.prod.conf.js +149 -149
  18. package/config/dev.env.js +8 -8
  19. package/config/index.js +93 -93
  20. package/config/prod.env.js +5 -5
  21. package/config/test.env.js +7 -7
  22. package/index.html +12 -12
  23. package/package/kisscomps/components/BoardCard/BoardCard.vue +117 -117
  24. package/package/kisscomps/components/BoardCard/index.js +2 -2
  25. package/package/kisscomps/components/ChannelRealtimeIntersection/ChannelRealtimeIntersection.vue +123 -123
  26. package/package/kisscomps/components/ChannelRealtimeIntersection/index.js +2 -2
  27. package/package/kisscomps/components/Channelization/Channelization.vue +584 -584
  28. package/package/kisscomps/components/Channelization/index.js +2 -2
  29. package/package/kisscomps/components/ChannelizationFlowStatistic/ChannelizationFlowStatistic.vue +360 -360
  30. package/package/kisscomps/components/ChannelizationFlowStatistic/index.js +2 -2
  31. package/package/kisscomps/components/ChannelizationWithInterface/ChannelizationWithInterface.vue +518 -518
  32. package/package/kisscomps/components/ChannelizationWithInterface/index.js +2 -2
  33. package/package/kisscomps/components/CommonKanban/CommonKanban.vue +132 -132
  34. package/package/kisscomps/components/CommonKanban/index.js +2 -2
  35. package/package/kisscomps/components/DirectionListConfiguration/DirectionListConfiguration.vue +454 -454
  36. package/package/kisscomps/components/DirectionListConfiguration/index.js +2 -2
  37. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-east-bottom.vue +41 -41
  38. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-east-top.vue +60 -60
  39. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-ewped.vue +105 -105
  40. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-north-left.vue +60 -60
  41. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-north-right.vue +60 -60
  42. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-snped.vue +105 -105
  43. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-south-left.vue +60 -60
  44. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-south-right.vue +60 -60
  45. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-west-bottom.vue +60 -60
  46. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-west-top.vue +60 -60
  47. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-xlped.vue +30 -30
  48. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-xrped.vue +30 -30
  49. package/package/kisscomps/components/DirectionListConfiguration/svg/pedSvg.vue +78 -78
  50. package/package/kisscomps/components/DrawChannelization/drawsvg/basicCoordInfo.vue +181 -181
  51. package/package/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +255 -255
  52. package/package/kisscomps/components/DrawChannelization/drawsvg/detectorAssociatedComponent.vue +152 -152
  53. package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/TextBox.vue +91 -91
  54. package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +194 -194
  55. package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/editText.vue +108 -108
  56. package/package/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +51 -51
  57. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +236 -236
  58. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +247 -247
  59. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +210 -210
  60. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +72 -72
  61. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +467 -467
  62. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +230 -230
  63. package/package/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +74 -74
  64. package/package/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +1005 -1005
  65. package/package/kisscomps/components/DrawChannelization/drawsvg/index.vue +110 -110
  66. package/package/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +707 -707
  67. package/package/kisscomps/components/DrawChannelization/drawsvg/overlapAssociatedComponent.vue +172 -172
  68. package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.vue +172 -172
  69. package/package/kisscomps/components/DrawChannelization/drawsvg/table.vue +99 -99
  70. package/package/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +87 -87
  71. package/package/kisscomps/components/DrawChannelization/drawsvg/utils/phaseDataModel.js +32 -32
  72. package/package/kisscomps/components/DrawChannelization/drawsvg/utils/phasePos.json +20 -20
  73. package/package/kisscomps/components/DrawChannelization/index.js +2 -2
  74. package/package/kisscomps/components/DrawChannelization/phaseDataMgr.js +278 -278
  75. package/package/kisscomps/components/ExpendConfig/ExpendConfig.vue +118 -118
  76. package/package/kisscomps/components/ExpendConfig/index.js +2 -2
  77. package/package/kisscomps/components/FaultDetailModal/FaultDetailModal.vue +178 -178
  78. package/package/kisscomps/components/FaultDetailModal/index.js +2 -2
  79. package/package/kisscomps/components/IntersectionDirectionSelection/IntersectionDirectionSelection.vue +158 -158
  80. package/package/kisscomps/components/IntersectionDirectionSelection/index.js +2 -2
  81. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/CrossRoadsSvg.vue +629 -629
  82. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/CustomRoadsSvg.vue +46 -46
  83. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionEWSvg.vue +447 -447
  84. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionSNSvg.vue +341 -341
  85. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampEastSvg.vue +497 -497
  86. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampNorthSvg.vue +353 -353
  87. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampSouthSvg.vue +359 -359
  88. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampWestSvg.vue +443 -443
  89. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkClickSvg.vue +1302 -1302
  90. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkSvg.vue +1190 -1190
  91. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeEastRoadsSvg.vue +498 -498
  92. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeNorthRoadsSvg.vue +484 -484
  93. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeSouthRoadsSvg.vue +488 -488
  94. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeWestRoadsSvg.vue +566 -566
  95. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LCrossRoadsSvg.vue +640 -640
  96. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeEastRoadsSvg.vue +497 -497
  97. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeNorthRoadsSvg.vue +486 -486
  98. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeSouthRoadsSvg.vue +490 -490
  99. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeWestRoadsSvg.vue +575 -575
  100. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/refreshSvg.vue +63 -63
  101. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/busMapSvg.vue +50 -50
  102. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/eastBusSvg.vue +167 -167
  103. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/northBusSvg.vue +168 -168
  104. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/southBusSvg.vue +168 -168
  105. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/westBusSvg.vue +169 -169
  106. package/package/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +1372 -1372
  107. package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/LphaseIconSvg.vue +197 -197
  108. package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/phaseIconSvg.vue +196 -196
  109. package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/rampPhaseIconSvg.vue +122 -122
  110. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.json +196 -196
  111. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.left.json +196 -196
  112. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.json +115 -115
  113. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.left.json +115 -115
  114. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/rampPos.json +52 -52
  115. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/sidePos.json +219 -219
  116. package/package/kisscomps/components/IntersectionMap/crossDirection/utils.js +84 -84
  117. package/package/kisscomps/components/IntersectionMap/index.js +2 -2
  118. package/package/kisscomps/components/IntersectionMap/intersectionmap.vue +211 -211
  119. package/package/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +530 -530
  120. package/package/kisscomps/components/IntersectionWithInterface/index.js +2 -2
  121. package/package/kisscomps/components/KanBan/index.js +2 -2
  122. package/package/kisscomps/components/KanBan/kanban.vue +231 -231
  123. package/package/kisscomps/components/MessageBox/index.vue +96 -96
  124. package/package/kisscomps/components/OverLap/OverLap.vue +237 -237
  125. package/package/kisscomps/components/OverLap/index.js +2 -2
  126. package/package/kisscomps/components/PatternOptimize/PatternOptimize.vue +272 -272
  127. package/package/kisscomps/components/PatternOptimize/index.js +2 -2
  128. package/package/kisscomps/components/PatternStatus/PatternStatus.vue +1649 -1649
  129. package/package/kisscomps/components/PatternStatus/index.js +2 -2
  130. package/package/kisscomps/components/PatternWalkSvg/PatternWalkSvg.vue +423 -423
  131. package/package/kisscomps/components/PatternWalkSvg/index.js +2 -2
  132. package/package/kisscomps/components/PhaseDirectionSelect/PhaseDirectionSelect.vue +126 -126
  133. package/package/kisscomps/components/PhaseDirectionSelect/index.js +2 -2
  134. package/package/kisscomps/components/PhaseDirectionText/PhaseDirectionText.vue +106 -106
  135. package/package/kisscomps/components/PhaseDirectionText/index.js +2 -2
  136. package/package/kisscomps/components/PhaseLegend/PhaseLegend.vue +286 -286
  137. package/package/kisscomps/components/PhaseLegend/index.js +2 -2
  138. package/package/kisscomps/components/PhaseMarker/index.js +6 -6
  139. package/package/kisscomps/components/PhaseMarker/phasemarker.vue +215 -215
  140. package/package/kisscomps/components/PhaseMarker/svg/patternSvg.vue +121 -121
  141. package/package/kisscomps/components/PhaseMarker/svg/phase.vue +60 -60
  142. package/package/kisscomps/components/PhaseMarker/svg/phaseCount.vue +62 -62
  143. package/package/kisscomps/components/PhaseMarker/svg/phaseCountCycle.vue +62 -62
  144. package/package/kisscomps/components/PhaseMarker/svg/phaseSvg.vue +117 -117
  145. package/package/kisscomps/components/PhasePedSelect/index.js +2 -2
  146. package/package/kisscomps/components/PhasePedSelect/index.vue +206 -206
  147. package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +949 -949
  148. package/package/kisscomps/components/SchemeConfig/azimuthlocking/index.vue +364 -364
  149. package/package/kisscomps/components/SchemeConfig/azimuthlocking/utils.js +92 -92
  150. package/package/kisscomps/components/SchemeConfig/closePhaselControlModal/index.vue +214 -214
  151. package/package/kisscomps/components/SchemeConfig/index.js +2 -2
  152. package/package/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +236 -236
  153. package/package/kisscomps/components/SchemeConfig/manualControlModal/index.vue +235 -235
  154. package/package/kisscomps/components/SchemeConfig/manualControlModalNew/controlModelGroup.vue +128 -128
  155. package/package/kisscomps/components/SchemeConfig/manualControlModalNew/icon.vue +438 -438
  156. package/package/kisscomps/components/SchemeConfig/manualControlModalNew/index.vue +864 -864
  157. package/package/kisscomps/components/SchemeConfig/manualControlModalNew/othersIcon.vue +151 -151
  158. package/package/kisscomps/components/SchemeConfig/priorityControl/index.vue +215 -215
  159. package/package/kisscomps/components/SchemeConfig/priorityControl/utils.js +163 -163
  160. package/package/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +283 -283
  161. package/package/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +1215 -1215
  162. package/package/kisscomps/components/SelectCrossPhase/index.vue +418 -418
  163. package/package/kisscomps/components/SelectCrossPhase/utils.js +142 -142
  164. package/package/kisscomps/components/StageBord/StageBord.vue +303 -303
  165. package/package/kisscomps/components/StageBord/index.js +2 -2
  166. package/package/kisscomps/components/StageStatus/StageStatus.vue +341 -341
  167. package/package/kisscomps/components/StageStatus/index.js +2 -2
  168. package/package/kisscomps/components/Stages/index.vue +319 -319
  169. package/package/kisscomps/components/SvgIcon/SvgIcon.vue +53 -53
  170. package/package/kisscomps/components/SvgIcon/index.js +2 -2
  171. package/package/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +1041 -1041
  172. package/package/kisscomps/components/XRDDirSelector/index.js +2 -2
  173. package/package/kisscomps/components/XiaoKanban/DirSelector.vue +356 -356
  174. package/package/kisscomps/components/XiaoKanban/index.vue +102 -102
  175. package/package/kisscomps/components/overView/index.vue +699 -699
  176. package/package/kisscomps/components/patternConfig/index.js +2 -2
  177. package/package/kisscomps/components/patternConfig/index.vue +739 -739
  178. package/package/kisscomps/components/patternConfig/pattern/patternTable.vue +421 -421
  179. package/package/kisscomps/components/patternConfig/pattern/planChart/model/coordinationModel.js +665 -665
  180. package/package/kisscomps/components/patternConfig/planContent.vue +575 -575
  181. package/package/kisscomps/components/patternConfig/planMenu.vue +329 -329
  182. package/package/kisscomps/components/patternConfig/utils.js +152 -152
  183. package/package/kisscomps/components/patternList/index.js +2 -2
  184. package/package/kisscomps/components/patternList/patternList.vue +590 -590
  185. package/package/kisscomps/index.js +127 -127
  186. package/package/kissui.js +216608 -0
  187. package/package/kissui.min.js +1 -1
  188. package/package.json +127 -127
  189. package/src/App.vue +24 -24
  190. package/src/EdgeMgr/EdgeModelBase.js +16 -16
  191. package/src/EdgeMgr/controller/crossDiagramMgr.js +125 -125
  192. package/src/api/authapi.js +31 -31
  193. package/src/api/config.js +21 -21
  194. package/src/api/control.js +106 -106
  195. package/src/api/cross.js +49 -49
  196. package/src/api/device.js +135 -135
  197. package/src/api/fault.js +66 -66
  198. package/src/api/index.js +24 -24
  199. package/src/api/login.js +46 -46
  200. package/src/api/optimize.js +72 -72
  201. package/src/api/param.js +165 -165
  202. package/src/api/passwdAssest.js +101 -101
  203. package/src/api/route.js +171 -171
  204. package/src/api/template.js +27 -27
  205. package/src/assets/font/LICENSE.txt +202 -202
  206. package/src/assets/font/font.css +6 -6
  207. package/src/i18n/index.js +26 -26
  208. package/src/i18n/language/en.js +1450 -1450
  209. package/src/i18n/language/index.js +25 -25
  210. package/src/i18n/language/zh.js +1449 -1449
  211. package/src/icons/demo_index.html +8445 -8445
  212. package/src/icons/iconfont.css +1451 -1451
  213. package/src/icons/iconfont.json +2522 -2522
  214. package/src/icons/index.js +20 -20
  215. package/src/icons/svg/azimuthlocking.svg +26 -26
  216. package/src/icons/svg/bendi.svg +110 -110
  217. package/src/icons/svg/bujin.svg +36 -36
  218. package/src/icons/svg/connectBlue.svg +7 -7
  219. package/src/icons/svg/currentvolume.svg +0 -0
  220. package/src/icons/svg/custom-BRTlane.svg +40 -40
  221. package/src/icons/svg/custom-buslane.svg +40 -40
  222. package/src/icons/svg/custom-detector.svg +12 -12
  223. package/src/icons/svg/custom-east-bottom.svg +32 -32
  224. package/src/icons/svg/custom-east-top.svg +32 -32
  225. package/src/icons/svg/custom-ewped.svg +35 -35
  226. package/src/icons/svg/custom-nonmotorizedlane.svg +40 -40
  227. package/src/icons/svg/custom-north-left.svg +32 -32
  228. package/src/icons/svg/custom-north-right.svg +32 -32
  229. package/src/icons/svg/custom-peddetector.svg +17 -17
  230. package/src/icons/svg/custom-snped.svg +35 -35
  231. package/src/icons/svg/custom-south-left.svg +32 -32
  232. package/src/icons/svg/custom-south-right.svg +32 -32
  233. package/src/icons/svg/custom-tramlane.svg +40 -40
  234. package/src/icons/svg/custom-vehiclebranch.svg +40 -40
  235. package/src/icons/svg/custom-vehiclemainroad.svg +41 -41
  236. package/src/icons/svg/custom-west-bottom.svg +32 -32
  237. package/src/icons/svg/custom-west-top.svg +32 -32
  238. package/src/icons/svg/custom-xlped.svg +14 -14
  239. package/src/icons/svg/custom-xrped.svg +14 -14
  240. package/src/icons/svg/cutRed.svg +7 -7
  241. package/src/icons/svg/cycle.svg +0 -0
  242. package/src/icons/svg/dingzhouqi.svg +34 -34
  243. package/src/icons/svg/ganyingkongzhi.svg +30 -30
  244. package/src/icons/svg/guandeng.svg +81 -81
  245. package/src/icons/svg/huangshan.svg +71 -71
  246. package/src/icons/svg/maincontrol.svg +0 -0
  247. package/src/icons/svg/manualcontrolbackground.svg +51 -51
  248. package/src/icons/svg/manualcontrolbackground1.svg +62 -62
  249. package/src/icons/svg/manualcontrolbackgrounden.svg +62 -62
  250. package/src/icons/svg/model.svg +0 -0
  251. package/src/icons/svg/phasediff.svg +0 -0
  252. package/src/icons/svg/prioritycontrol.svg +21 -21
  253. package/src/icons/svg/quanhong.svg +86 -86
  254. package/src/icons/svg/shanghe.svg +11 -11
  255. package/src/icons/svg/shoudong.svg +103 -103
  256. package/src/icons/svg/tentativeplan.svg +28 -28
  257. package/src/icons/svg/time.svg +0 -0
  258. package/src/icons/svg/wuxianlan.svg +46 -46
  259. package/src/icons/svg/xiala.svg +11 -11
  260. package/src/icons/svg/xingrenguojie.svg +33 -33
  261. package/src/icons/svg/xitong.svg +89 -89
  262. package/src/icons/svg/youxian.svg +41 -41
  263. package/src/icons/svg/zizhukongzhi.svg +43 -43
  264. package/src/kisscomps/components/BoardCard/BoardCard.vue +117 -117
  265. package/src/kisscomps/components/BoardCard/index.js +2 -2
  266. package/src/kisscomps/components/ChannelRealtimeIntersection/ChannelRealtimeIntersection.vue +123 -123
  267. package/src/kisscomps/components/ChannelRealtimeIntersection/index.js +2 -2
  268. package/src/kisscomps/components/Channelization/Channelization.vue +584 -584
  269. package/src/kisscomps/components/Channelization/index.js +2 -2
  270. package/src/kisscomps/components/ChannelizationFlowStatistic/ChannelizationFlowStatistic.vue +360 -360
  271. package/src/kisscomps/components/ChannelizationFlowStatistic/index.js +2 -2
  272. package/src/kisscomps/components/ChannelizationWithInterface/ChannelizationWithInterface.vue +518 -518
  273. package/src/kisscomps/components/ChannelizationWithInterface/index.js +2 -2
  274. package/src/kisscomps/components/CommonKanban/CommonKanban.vue +132 -132
  275. package/src/kisscomps/components/CommonKanban/index.js +2 -2
  276. package/src/kisscomps/components/DirectionListConfiguration/DirectionListConfiguration.vue +454 -454
  277. package/src/kisscomps/components/DirectionListConfiguration/index.js +2 -2
  278. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-east-bottom.vue +41 -41
  279. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-east-top.vue +60 -60
  280. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-ewped.vue +105 -105
  281. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-north-left.vue +60 -60
  282. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-north-right.vue +60 -60
  283. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-snped.vue +105 -105
  284. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-south-left.vue +60 -60
  285. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-south-right.vue +60 -60
  286. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-west-bottom.vue +60 -60
  287. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-west-top.vue +60 -60
  288. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-xlped.vue +30 -30
  289. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-xrped.vue +30 -30
  290. package/src/kisscomps/components/DirectionListConfiguration/svg/pedSvg.vue +78 -78
  291. package/src/kisscomps/components/DrawChannelization/drawsvg/basicCoordInfo.vue +181 -181
  292. package/src/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +255 -255
  293. package/src/kisscomps/components/DrawChannelization/drawsvg/detectorAssociatedComponent.vue +152 -152
  294. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/TextBox.vue +91 -91
  295. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +194 -194
  296. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/editText.vue +108 -108
  297. package/src/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +51 -51
  298. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +236 -236
  299. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +247 -247
  300. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +210 -210
  301. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +72 -72
  302. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +467 -467
  303. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +230 -230
  304. package/src/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +74 -74
  305. package/src/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +1005 -1005
  306. package/src/kisscomps/components/DrawChannelization/drawsvg/index.vue +110 -110
  307. package/src/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +707 -707
  308. package/src/kisscomps/components/DrawChannelization/drawsvg/overlapAssociatedComponent.vue +172 -172
  309. package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.vue +172 -172
  310. package/src/kisscomps/components/DrawChannelization/drawsvg/table.vue +99 -99
  311. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +87 -87
  312. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/phaseDataModel.js +32 -32
  313. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/phasePos.json +20 -20
  314. package/src/kisscomps/components/DrawChannelization/index.js +2 -2
  315. package/src/kisscomps/components/DrawChannelization/phaseDataMgr.js +278 -278
  316. package/src/kisscomps/components/ExpendConfig/ExpendConfig.vue +118 -118
  317. package/src/kisscomps/components/ExpendConfig/index.js +2 -2
  318. package/src/kisscomps/components/FaultDetailModal/FaultDetailModal.vue +178 -178
  319. package/src/kisscomps/components/FaultDetailModal/index.js +2 -2
  320. package/src/kisscomps/components/IntersectionDirectionSelection/IntersectionDirectionSelection.vue +158 -158
  321. package/src/kisscomps/components/IntersectionDirectionSelection/index.js +2 -2
  322. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/CrossRoadsSvg.vue +629 -629
  323. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/CustomRoadsSvg.vue +46 -46
  324. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionEWSvg.vue +447 -447
  325. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionSNSvg.vue +341 -341
  326. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampEastSvg.vue +497 -497
  327. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampNorthSvg.vue +353 -353
  328. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampSouthSvg.vue +359 -359
  329. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampWestSvg.vue +443 -443
  330. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkClickSvg.vue +1302 -1302
  331. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkSvg.vue +1190 -1190
  332. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeEastRoadsSvg.vue +498 -498
  333. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeNorthRoadsSvg.vue +484 -484
  334. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeSouthRoadsSvg.vue +488 -488
  335. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeWestRoadsSvg.vue +566 -566
  336. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LCrossRoadsSvg.vue +640 -640
  337. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeEastRoadsSvg.vue +497 -497
  338. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeNorthRoadsSvg.vue +486 -486
  339. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeSouthRoadsSvg.vue +490 -490
  340. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeWestRoadsSvg.vue +575 -575
  341. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/refreshSvg.vue +63 -63
  342. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/busMapSvg.vue +50 -50
  343. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/eastBusSvg.vue +167 -167
  344. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/northBusSvg.vue +168 -168
  345. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/southBusSvg.vue +168 -168
  346. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/westBusSvg.vue +169 -169
  347. package/src/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +1372 -1372
  348. package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/LphaseIconSvg.vue +197 -197
  349. package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/phaseIconSvg.vue +196 -196
  350. package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/rampPhaseIconSvg.vue +122 -122
  351. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.json +196 -196
  352. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.left.json +196 -196
  353. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.json +115 -115
  354. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.left.json +115 -115
  355. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/rampPos.json +52 -52
  356. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/sidePos.json +219 -219
  357. package/src/kisscomps/components/IntersectionMap/crossDirection/utils.js +84 -84
  358. package/src/kisscomps/components/IntersectionMap/index.js +2 -2
  359. package/src/kisscomps/components/IntersectionMap/intersectionmap.vue +211 -211
  360. package/src/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +530 -530
  361. package/src/kisscomps/components/IntersectionWithInterface/index.js +2 -2
  362. package/src/kisscomps/components/KanBan/index.js +2 -2
  363. package/src/kisscomps/components/KanBan/kanban.vue +231 -231
  364. package/src/kisscomps/components/MessageBox/index.vue +96 -96
  365. package/src/kisscomps/components/OverLap/OverLap.vue +237 -237
  366. package/src/kisscomps/components/OverLap/index.js +2 -2
  367. package/src/kisscomps/components/PatternOptimize/PatternOptimize.vue +272 -272
  368. package/src/kisscomps/components/PatternOptimize/index.js +2 -2
  369. package/src/kisscomps/components/PatternStatus/PatternStatus.vue +1649 -1649
  370. package/src/kisscomps/components/PatternStatus/index.js +2 -2
  371. package/src/kisscomps/components/PatternWalkSvg/PatternWalkSvg.vue +423 -423
  372. package/src/kisscomps/components/PatternWalkSvg/index.js +2 -2
  373. package/src/kisscomps/components/PhaseDirectionSelect/PhaseDirectionSelect.vue +126 -126
  374. package/src/kisscomps/components/PhaseDirectionSelect/index.js +2 -2
  375. package/src/kisscomps/components/PhaseDirectionText/PhaseDirectionText.vue +106 -106
  376. package/src/kisscomps/components/PhaseDirectionText/index.js +2 -2
  377. package/src/kisscomps/components/PhaseLegend/PhaseLegend.vue +286 -286
  378. package/src/kisscomps/components/PhaseLegend/index.js +2 -2
  379. package/src/kisscomps/components/PhaseMarker/index.js +6 -6
  380. package/src/kisscomps/components/PhaseMarker/phasemarker.vue +215 -215
  381. package/src/kisscomps/components/PhaseMarker/svg/patternSvg.vue +121 -121
  382. package/src/kisscomps/components/PhaseMarker/svg/phase.vue +60 -60
  383. package/src/kisscomps/components/PhaseMarker/svg/phaseCount.vue +62 -62
  384. package/src/kisscomps/components/PhaseMarker/svg/phaseCountCycle.vue +62 -62
  385. package/src/kisscomps/components/PhaseMarker/svg/phaseSvg.vue +117 -117
  386. package/src/kisscomps/components/PhasePedSelect/index.js +2 -2
  387. package/src/kisscomps/components/PhasePedSelect/index.vue +206 -206
  388. package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +949 -949
  389. package/src/kisscomps/components/SchemeConfig/azimuthlocking/index.vue +364 -364
  390. package/src/kisscomps/components/SchemeConfig/azimuthlocking/utils.js +92 -92
  391. package/src/kisscomps/components/SchemeConfig/closePhaselControlModal/index.vue +214 -214
  392. package/src/kisscomps/components/SchemeConfig/index.js +2 -2
  393. package/src/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +236 -236
  394. package/src/kisscomps/components/SchemeConfig/manualControlModal/index.vue +235 -235
  395. package/src/kisscomps/components/SchemeConfig/manualControlModalNew/controlModelGroup.vue +128 -128
  396. package/src/kisscomps/components/SchemeConfig/manualControlModalNew/icon.vue +438 -438
  397. package/src/kisscomps/components/SchemeConfig/manualControlModalNew/index.vue +864 -864
  398. package/src/kisscomps/components/SchemeConfig/manualControlModalNew/othersIcon.vue +151 -151
  399. package/src/kisscomps/components/SchemeConfig/priorityControl/index.vue +215 -215
  400. package/src/kisscomps/components/SchemeConfig/priorityControl/utils.js +163 -163
  401. package/src/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +283 -283
  402. package/src/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +1215 -1215
  403. package/src/kisscomps/components/SelectCrossPhase/index.vue +418 -418
  404. package/src/kisscomps/components/SelectCrossPhase/utils.js +142 -142
  405. package/src/kisscomps/components/StageBord/StageBord.vue +303 -303
  406. package/src/kisscomps/components/StageBord/index.js +2 -2
  407. package/src/kisscomps/components/StageStatus/StageStatus.vue +341 -341
  408. package/src/kisscomps/components/StageStatus/index.js +2 -2
  409. package/src/kisscomps/components/Stages/index.vue +319 -319
  410. package/src/kisscomps/components/SvgIcon/SvgIcon.vue +53 -53
  411. package/src/kisscomps/components/SvgIcon/index.js +2 -2
  412. package/src/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +1041 -1041
  413. package/src/kisscomps/components/XRDDirSelector/index.js +2 -2
  414. package/src/kisscomps/components/XiaoKanban/DirSelector.vue +356 -356
  415. package/src/kisscomps/components/XiaoKanban/index.vue +102 -102
  416. package/src/kisscomps/components/overView/index.vue +699 -699
  417. package/src/kisscomps/components/patternConfig/index.js +2 -2
  418. package/src/kisscomps/components/patternConfig/index.vue +739 -739
  419. package/src/kisscomps/components/patternConfig/pattern/patternTable.vue +421 -421
  420. package/src/kisscomps/components/patternConfig/pattern/planChart/model/coordinationModel.js +665 -665
  421. package/src/kisscomps/components/patternConfig/planContent.vue +575 -575
  422. package/src/kisscomps/components/patternConfig/planMenu.vue +329 -329
  423. package/src/kisscomps/components/patternConfig/utils.js +152 -152
  424. package/src/kisscomps/components/patternList/index.js +2 -2
  425. package/src/kisscomps/components/patternList/patternList.vue +590 -590
  426. package/src/kisscomps/index.js +127 -127
  427. package/src/lib/publicjs/ArryListUtil.js +38 -38
  428. package/src/lib/publicjs/HttpurlMgr.js +45 -45
  429. package/src/lib/publicjs/KissApi.js +158 -158
  430. package/src/lib/publicjs/KissWSSub/Heartcheck.js +128 -128
  431. package/src/lib/publicjs/KissWSSub/KissWsSub.js +91 -91
  432. package/src/lib/publicjs/KissWSSub/KissWsSubByType.js +152 -152
  433. package/src/lib/publicjs/KissWSSub/SimuWsSubByType.js +44 -44
  434. package/src/lib/publicjs/KissWSSub/Sub.js +51 -51
  435. package/src/lib/publicjs/KissWSSub/SubChannel.js +119 -119
  436. package/src/lib/publicjs/basecomponents.js +65 -65
  437. package/src/lib/publicjs/localStorage.js +112 -112
  438. package/src/lib/publicjs/objdeepcopy.js +32 -32
  439. package/src/lib/publicjs/pageScroll.js +30 -30
  440. package/src/lib/publicjs/passwdAssest.js +101 -101
  441. package/src/lib/publicjs/styleclassfactory.js +32 -32
  442. package/src/main.js +51 -51
  443. package/src/router/index.js +63 -63
  444. package/src/store/getters.js +16 -16
  445. package/src/store/index.js +26 -26
  446. package/src/store/modules/globalParam.js +67 -67
  447. package/src/utils/ControlFormat.js +68 -68
  448. package/src/utils/RingDataModel.js +331 -331
  449. package/src/utils/auth.js +199 -199
  450. package/src/utils/conflct.js +259 -259
  451. package/src/utils/conflictList.js +87 -87
  452. package/src/utils/dateFormat.js +41 -41
  453. package/src/utils/errorcode.js +227 -227
  454. package/src/utils/fault.js +196 -196
  455. package/src/utils/faultcode.js +209 -209
  456. package/src/utils/index.js +69 -69
  457. package/src/utils/pedphasedesc.js +119 -119
  458. package/src/utils/phaseList.js +203 -203
  459. package/src/utils/phasedesc.js +144 -144
  460. package/src/utils/responseMessage.js +21 -21
  461. package/src/utils/validate.js +43 -43
  462. package/src/views/customchannelization.vue +49 -49
  463. package/src/views/home.1.vue +479 -479
  464. package/src/views/home.vue +93 -93
  465. package/src/views/intersection.vue +521 -521
  466. package/src/views/intersection2.vue +328 -328
  467. package/src/views/overView.vue +41 -41
  468. package/src/views/patternConfig.vue +609 -609
  469. package/src/views/schemeconfig.vue +208 -208
  470. package/static/apiconfig.json +451 -451
  471. package/static/styles/channelizatioon.scss +433 -433
  472. package/static/styles/common.scss +30 -30
  473. package/static/styles/commonkanban.scss +168 -168
  474. package/static/styles/dark/index.scss +2 -2
  475. package/static/styles/dark/theme/element-dark.scss +44 -44
  476. package/static/styles/index.scss +84 -84
  477. package/static/styles/intersection.scss +180 -180
  478. package/static/styles/light/index.scss +2 -2
  479. package/static/styles/light/theme/element-light.scss +44 -44
  480. package/static/styles/overview.scss +146 -146
  481. package/static/styles/patternConfig.scss +56 -56
  482. package/static/styles/phasePedSelect.scss +71 -71
  483. package/static/styles/schemeconfig.scss +552 -552
  484. package/static/styles/stages.scss +57 -57
  485. package/static/styles/theme/element-dark.scss +0 -0
  486. package/static/styles/uiComponents.scss +57 -57
  487. package/static/styles/xiaokanban.scss +50 -50
  488. package/static/token.json +2 -2
  489. package/test/e2e/custom-assertions/elementCount.js +27 -27
  490. package/test/e2e/nightwatch.conf.js +46 -46
  491. package/test/e2e/runner.js +48 -48
  492. package/test/e2e/specs/test.js +19 -19
  493. package/test/unit/.eslintrc +7 -7
  494. package/test/unit/jest.conf.js +30 -30
  495. package/test/unit/setup.js +3 -3
  496. package/test/unit/specs/HelloWorld.spec.js +11 -11
  497. package/src/node_modules/.package_versions.json +0 -1
@@ -1,864 +1,864 @@
1
- /**
2
- * Copyright (c) 2020 kedacom
3
- * OpenATC is licensed under Mulan PSL v2.
4
- * You can use this software according to the terms and conditions of the Mulan PSL v2.
5
- * You may obtain a copy of Mulan PSL v2 at:
6
- * http://license.coscl.org.cn/MulanPSL2
7
- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
8
- * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
9
- * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
10
- * See the Mulan PSL v2 for more details.
11
- **/
12
- <template>
13
- <div class="manual-control-modal-new">
14
- <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
15
- <el-tab-pane :label="$t('openatccomponents.overview.residentcontrol')" name="residentcontrol">
16
- <ControlModelGroup
17
- v-if="activeName === 'residentcontrol'"
18
- ref="ControlModelGroup"
19
- className="residentcontrol"
20
- :controlList="residentControlList"
21
- :funcSort="funcSort"
22
- @selectModel="selectModel"
23
- />
24
-
25
- <div class="common-config" v-if="activeName === 'residentcontrol' && preselecttype !== '相位锁定' && preselecttype !== '方向锁定'">
26
- <el-form
27
- ref="manual"
28
- label-position="left"
29
- :model="manualInfo"
30
- label-width="90px">
31
- <el-form-item
32
- :label="$t('openatccomponents.overview.duration')"
33
- prop="count">
34
- <el-input-number style="width: 170px;" v-model="manualInfo.tempDuration" :controls="false" :max="65535" :min="0" :precision="0" :step="1" :placeholder="$t('openatccomponents.common.input')" size="small"></el-input-number>
35
- </el-form-item>
36
- </el-form>
37
- </div>
38
-
39
- <div class="stage-part" v-if="preselecttype === '阶段锁定'">
40
- <div class="stage-label">{{$t('openatccomponents.overview.stage')}}</div>
41
- <div style="width: 100%; height: auto;overflow: hidden;" v-if="isHasPermission('configer:manual:dwell')">
42
- <Stages :crossStatusData="manuals?manualsStage:realtimeStage"
43
- :phaseList="phaseList"
44
- :preselectStages="preselectStages"
45
- :preselectModel="preselectModel"
46
- :isShowCurrentStage="false"
47
- @onSelectStages="selectStages"></Stages>
48
- </div>
49
- </div>
50
-
51
- <LockingPhaseControlModal
52
- v-if="preselecttype === '相位锁定'"
53
- :roadDirection="roadDirection"
54
- :phaseList="phaseList"
55
- :patternStatus="statusData"
56
- :lockPhaseBtnName="lockPhaseBtnName"
57
- :isShowBack="isShowBack"
58
- :isShowRecovery="isShowRecovery"
59
- @closePhaseBack="handleClose"
60
- @closePhaseControl="closePhaseControl"
61
- @toAutoControl="toAutoControl" />
62
-
63
- <AzimuthLocking
64
- v-if="preselecttype === '方向锁定'"
65
- :realtimeStatusModalvisible="realtimeStatusModalvisible"
66
- :phaseList="phaseList"
67
- :patternStatus="statusData"
68
- :isShowBack="isShowBack"
69
- :isShowRecovery="isShowRecovery"
70
- @closePhaseBack="handleClose"
71
- @toAutoControl="toAutoControl"
72
- />
73
-
74
- <div class="footer" v-if="realtimeStatusModalvisible && ((activeName === 'residentcontrol' && preselecttype !== '相位锁定' && preselecttype !== '方向锁定') || activeName === 'specialcontrol' || activeName === 'schemeselection')">
75
- <el-button v-if="isShowBack" @click="handleClose()">{{$t('openatccomponents.button.Back')}}</el-button>
76
- <el-button @click="toAutoControl()" v-if="isShowRecovery && isHasPermission('configer:manual:renew')">{{$t('openatccomponents.overview.recovery')}}</el-button>
77
- <el-button type="primary" @click="handleManualControl()">{{$t('openatccomponents.overview.implement')}}</el-button>
78
- </div>
79
- <div class="footer" v-if="!realtimeStatusModalvisible && ((activeName === 'residentcontrol' && preselecttype !== '相位锁定' && preselecttype !== '方向锁定') || activeName === 'specialcontrol' || activeName === 'schemeselection')">
80
- <el-button @click="toAutoControl()" v-if="isShowRecovery && isHasPermission('configer:manual:renew')">{{$t('openatccomponents.overview.recovery')}}</el-button>
81
- <el-button class="3" type="primary" @click="handleManualControl()">{{$t('openatccomponents.overview.comfirm')}}</el-button>
82
- </div>
83
- </el-tab-pane>
84
- <el-tab-pane :label="$t('openatccomponents.overview.specialcontrol')" name="specialcontrol">
85
- <ControlModelGroup
86
- v-if="activeName === 'specialcontrol'"
87
- ref="ControlModelGroup"
88
- className="specialcontrol"
89
- :controlList="specialControlList"
90
- :funcSort="funcSort"
91
- @selectModel="selectModel"
92
- />
93
-
94
- <div class="common-config">
95
- <el-form
96
- ref="manual"
97
- label-position="left"
98
- :model="manualInfo"
99
- label-width="90px">
100
- <el-form-item
101
- :label="$t('openatccomponents.overview.duration')"
102
- prop="count">
103
- <el-input-number style="width: 170px;" v-model="manualInfo.tempDuration" :controls="false" :max="65535" :min="0" :precision="0" :step="1" :placeholder="$t('openatccomponents.common.input')" size="small"></el-input-number>
104
- </el-form-item>
105
- </el-form>
106
- </div>
107
-
108
- <div class="footer" v-if="realtimeStatusModalvisible && ((activeName === 'residentcontrol' && preselecttype !== '相位锁定' && preselecttype !== '方向锁定') || activeName === 'specialcontrol' || activeName === 'schemeselection')">
109
- <el-button v-if="isShowBack" @click="handleClose()">{{$t('openatccomponents.button.Back')}}</el-button>
110
- <el-button @click="toAutoControl()" v-if="isShowRecovery && isHasPermission('configer:manual:renew')">{{$t('openatccomponents.overview.recovery')}}</el-button>
111
- <el-button type="primary" @click="handleManualControl()">{{$t('openatccomponents.overview.implement')}}</el-button>
112
- </div>
113
- <div class="footer" v-if="!realtimeStatusModalvisible && ((activeName === 'residentcontrol' && preselecttype !== '相位锁定' && preselecttype !== '方向锁定') || activeName === 'specialcontrol' || activeName === 'schemeselection')">
114
- <el-button @click="toAutoControl()" v-if="isShowRecovery && isHasPermission('configer:manual:renew')">{{$t('openatccomponents.overview.recovery')}}</el-button>
115
- <el-button class="3" type="primary" @click="handleManualControl()">{{$t('openatccomponents.overview.comfirm')}}</el-button>
116
- </div>
117
-
118
- </el-tab-pane>
119
- <el-tab-pane :label="$t('openatccomponents.overview.schemeselection')" name="schemeselection">
120
- <ControlModelGroup
121
- v-if="activeName === 'schemeselection'"
122
- ref="ControlModelGroup"
123
- className="otherscontrol"
124
- :controlList="patternChooseControlList"
125
- :funcSort="funcSort"
126
- @selectModel="selectModel"
127
- @selectSpecialModel="selectSpecialModel" />
128
-
129
- <div class="common-config" v-if="activeName === 'schemeselection'">
130
- <el-form
131
- ref="manual"
132
- label-position="left"
133
- :model="manualInfo"
134
- label-width="90px">
135
- <el-form-item
136
- :label="$t('openatccomponents.overview.duration')"
137
- prop="count">
138
- <el-input-number style="width: 170px;" v-model="manualInfo.tempDuration" :controls="false" :max="65535" :min="0" :precision="0" :step="1" :placeholder="$t('openatccomponents.common.input')" size="small"></el-input-number>
139
- </el-form-item>
140
- <el-form-item
141
- :label="$t('openatccomponents.overview.controlnumber')"
142
- prop="shape">
143
- <el-select style="width: 170px;" v-model="manualInfo.tempPatternid" @change="handleSelectPatternOption" class="col-inner" size="small" :placeholder="$t('openatccomponents.common.select')">
144
- <el-option
145
- v-for="item in patternSelect"
146
- :key="item.value"
147
- :label="item.label"
148
- :value="item.value">
149
- </el-option>
150
- </el-select>
151
- </el-form-item>
152
- </el-form>
153
-
154
- <div>
155
- <pattern-list
156
- :key="keyChange"
157
- :allPatternList="allPatternList"
158
- :contrloType="!this.isRing ? 'ring' : 'stage'"
159
- :stagesChange="
160
- patternOne.length === 0
161
- ? planPattern.stagesList
162
- : patternOne[0].stagesList
163
- "
164
- :patternList="patternOne.length === 0 ? planPattern.rings : patternOne"
165
- :patternStatusList="
166
- patternOne.length === 0 ? planPattern.rings : patternOne[0].rings
167
- "
168
- :cycles="
169
- patternOne.length === 0 ? planPattern.cycle : patternOne[0].cycle
170
- "
171
- :phaseList="phaseList"
172
- >
173
- </pattern-list>
174
- </div>
175
- </div>
176
-
177
- <div class="footer" v-if="realtimeStatusModalvisible && ((activeName === 'residentcontrol' && preselecttype !== '相位锁定' && preselecttype !== '方向锁定') || activeName === 'specialcontrol' || activeName === 'schemeselection')">
178
- <el-button v-if="isShowBack" @click="handleClose()">{{$t('openatccomponents.button.Back')}}</el-button>
179
- <el-button @click="toAutoControl()" v-if="isShowRecovery && isHasPermission('configer:manual:renew')">{{$t('openatccomponents.overview.recovery')}}</el-button>
180
- <el-button type="primary" @click="handleManualControl()">{{$t('openatccomponents.overview.implement')}}</el-button>
181
- </div>
182
- <div class="footer" v-if="!realtimeStatusModalvisible && ((activeName === 'residentcontrol' && preselecttype !== '相位锁定' && preselecttype !== '方向锁定') || activeName === 'specialcontrol' || activeName === 'schemeselection')">
183
- <el-button @click="toAutoControl()" v-if="isShowRecovery && isHasPermission('configer:manual:renew')">{{$t('openatccomponents.overview.recovery')}}</el-button>
184
- <el-button class="3" type="primary" @click="handleManualControl()">{{$t('openatccomponents.overview.comfirm')}}</el-button>
185
- </div>
186
- </el-tab-pane>
187
- <el-tab-pane :label="$t('openatccomponents.overview.others')" name="others">
188
- <ControlModelGroup
189
- v-if="activeName === 'others'"
190
- ref="ControlModelGroup"
191
- className="otherscontrol"
192
- othersControl
193
- :controlList="othersControlList"
194
- :funcSort="funcSort"
195
- @selectModel="selectModel"
196
- @selectSpecialModel="selectSpecialModel"
197
- />
198
- <ClosePhaseControlModal
199
- v-if="preselecttype === '相位关断'"
200
- :controlData="controlData"
201
- :closePhaseRings="closePhaseRings"
202
- :sidewalkPhaseData="sidewalkPhaseData"
203
- :realtimeStatusModalvisible="realtimeStatusModalvisible"
204
- :roadDirection="roadDirection"
205
- :isShowBack="isShowBack"
206
- :isShowRecovery="isShowRecovery"
207
- @closePhaseBack="handleClose"
208
- @closePhaseControl="closePhaseControl"
209
- @toAutoControl="toAutoControl" />
210
- <TentativePlanControlModal
211
- v-if="preselecttype === '临时方案'"
212
- :realtimeStatusModalvisible="realtimeStatusModalvisible"
213
- :controlData="controlData"
214
- :phaseList="phaseList"
215
- :overlap="overlap"
216
- :patternSelect="patternSelect"
217
- :allPatternList="allPatternList"
218
- :isShowBack="isShowBack"
219
- :isShowRecovery="isShowRecovery"
220
- @closePhaseBack="handleClose"
221
- @closePhaseControl="closePhaseControl"
222
- @toAutoControl="toAutoControl"
223
- />
224
- <PriorityControl
225
- v-if="preselecttype === '优先控制'"
226
- :realtimeStatusModalvisible="realtimeStatusModalvisible"
227
- :phaseList="phaseList"
228
- :isShowBack="isShowBack"
229
- :isShowRecovery="isShowRecovery"
230
- @closePhaseBack="handleClose"
231
- @closePhaseControl="closePhaseControl"
232
- @toAutoControl="toAutoControl"
233
- />
234
- </el-tab-pane>
235
- </el-tabs>
236
- </div>
237
- </template>
238
-
239
- <script>
240
- import xdrdirselector from '../../XRDDirSelector/XRDDirSelector'
241
- import Stages from '../../Stages/index'
242
- import { hasPermission } from '../../../../utils/auth'
243
- import LockingPhaseControlModal from '../lockingPhaselControlModal'
244
- import AzimuthLocking from '../azimuthlocking'
245
- import ControlModelGroup from './controlModelGroup'
246
- import ClosePhaseControlModal from '../closePhaselControlModal'
247
- import TentativePlanControlModal from '../tentativeplancontrolmodal'
248
- import PriorityControl from '../priorityControl'
249
-
250
- export default {
251
- name: 'manualControl',
252
- components: {
253
- xdrdirselector,
254
- Stages,
255
- LockingPhaseControlModal,
256
- AzimuthLocking,
257
- ControlModelGroup,
258
- ClosePhaseControlModal,
259
- TentativePlanControlModal,
260
- PriorityControl
261
- },
262
- props: {
263
- patternAll: {
264
- type: Array
265
- },
266
- crossStatusData: {
267
- type: Object,
268
- default: () => {}
269
- },
270
- phaseList: {
271
- type: Array,
272
- default () {
273
- return []
274
- }
275
- },
276
- Visible: {
277
- type: Boolean
278
- },
279
- controlData: {
280
- type: Object
281
- },
282
- modelList: {
283
- type: Array
284
- },
285
- residentControlList: {
286
- type: Array
287
- },
288
- // stagesList: {
289
- // type: Array
290
- // },
291
- patternSelect: {
292
- type: Array
293
- },
294
- currModel: {
295
- type: Number
296
- },
297
- preselectModel: {
298
- type: Number
299
- },
300
- currentStage: {
301
- type: Number
302
- },
303
- preselectStages: {
304
- type: Number
305
- },
306
- specialcontrolList: {
307
- type: Array
308
- },
309
- realtimeStatusModalvisible: { // 区分是保存方案还是提交方案,保存方案没有路口实时信息
310
- type: Boolean,
311
- default: true
312
- },
313
- funcSort: {
314
- type: String,
315
- default: 'allFunc'
316
- },
317
- roadDirection: {
318
- type: String
319
- },
320
- statusData: {
321
- type: Object
322
- },
323
- lockPhaseBtnName: {
324
- type: String
325
- },
326
- specialControlList: {
327
- type: Array
328
- },
329
- othersControlList: {
330
- type: Array
331
- },
332
- closePhaseRings: {
333
- type: Array
334
- },
335
- sidewalkPhaseData: {
336
- type: Array
337
- },
338
- overlap: {
339
- type: Array
340
- },
341
- allPatternList: {
342
- type: Array
343
- },
344
- patternChooseControlList: {
345
- type: Array
346
- },
347
- isShowBack: {
348
- type: Boolean,
349
- default: true
350
- },
351
- isShowRecovery: {
352
- type: Boolean,
353
- default: true
354
- }
355
- },
356
- watch: {
357
- activeName: {
358
- handler: function (val) {
359
- },
360
- // 深度观察监听
361
- deep: true
362
- },
363
- patternSelect: {
364
- handler: function (val) {
365
- this.manualInfo.tempPatternid = this.crossStatusData.patternid
366
- },
367
- // 深度观察监听
368
- deep: true
369
- },
370
- crossStatusData: {
371
- handler: function (val) {
372
- this.manualInfo.tempPatternid = this.manualInfo.tempPatternid ? this.manualInfo.tempPatternid : val.patternid
373
- this.realtimeStage = JSON.parse(JSON.stringify(this.crossStatusData))
374
- },
375
- // 深度观察监听
376
- deep: true
377
- }
378
- },
379
- data () {
380
- return {
381
- basicFuncControlId: [0, 1, 4, 5], // 基础功能包含的控制方式: 自主控制(手动下)、黄闪、步进、定周期
382
- visible: this.Visible,
383
- manuals: false,
384
- realtimeStage: {},
385
- manualsStage: {},
386
- manualInfo: {
387
- tempPatternid: '', // 控制方式手动操作的情况下的控制编号的临时值。
388
- // tempDelay: 0, // 控制方式手动操作的情况下的延迟时间的临时值。
389
- tempDuration: 300 // 控制方式手动操作的情况下的持续时间的临时值。
390
- },
391
- activeName: 'residentcontrol',
392
- preselecttype: '',
393
- keyChange: false,
394
- isRing: false,
395
- patternOne: [],
396
- planPattern: {}
397
- }
398
- },
399
- methods: {
400
- handleClick (tab, event) {
401
- this.$nextTick(() => {
402
- this.init(tab)
403
- })
404
- },
405
- isHasPermission (path) {
406
- let res = hasPermission(path)
407
- return res
408
- },
409
- handleSelectPatternOption (value) {
410
- if (value === '') {
411
- this.manualInfo.tempPatternid = 0
412
- return
413
- }
414
- this.changeStage(value)
415
- this.selectPattern()
416
- },
417
- selectPattern () {
418
- this.manualInfo.offset = 0
419
- let selectId = Number(this.manualInfo.tempPatternid)
420
- this.patternOne = this.allPatternList.filter(item => {
421
- return item.id === selectId
422
- })
423
- this.manualInfo.offset = this.offset
424
- for (let rings of this.patternOne[0].rings) {
425
- if (rings.length === 0) continue
426
- for (let ring of rings) {
427
- if (ring.value === 0) continue
428
- let currPhase = this.phaseList.filter((item) => {
429
- return item.id === ring.id
430
- })[0]
431
- ring.desc = currPhase.direction.map(item => {
432
- return {
433
- id: item,
434
- color: '#454545'
435
- }
436
- })
437
- }
438
- }
439
- this.handleStageData(this.patternOne[0].rings)
440
- },
441
- handleStageData (rings) { // stagesList
442
- if (!rings) return
443
- for (let i = 0; i < rings.length; i++) {
444
- if (rings[i].length > 0) {
445
- let phaseList = []
446
- let stagesList = []
447
- // rings = JSON.parse(JSON.stringify(rings))
448
- let mapAdd = rings.map(item => {
449
- return item.map(val => {
450
- // if (val.mode !== 7) {
451
- return val.value + (val.sum ? val.sum : 0)
452
- // } else {
453
- // return 0
454
- // }
455
- })
456
- })
457
- let maxCycle = mapAdd.length > 0 ? mapAdd.map(item => {
458
- return item.length > 0 ? item.reduce((a, b) => {
459
- return a + b
460
- }) : 0
461
- }) : 0
462
- this.max = Math.max(...maxCycle)// 每个环的周期最大值
463
- this.stateList = [0]
464
- this.narr = []
465
- let currentIds = ''
466
- let lastCurrentIds = ''
467
- for (let j = 0; j <= this.max; j++) { // 指针长度
468
- for (let i = 0; i < rings.length; i++) { // 环列表
469
- let ring = rings[i]// 每个环对象
470
- let sum = 0
471
- for (let n = 0; n < ring.length; n++) { // 相位累计长度
472
- // if (ring[n].mode !== 7) {
473
- sum = sum + ring[n].value + (ring[n].sum ? ring[n].sum : 0)
474
- if (j < sum) {
475
- let phaseId = ring[n].id
476
- currentIds = currentIds + '-' + phaseId
477
- break
478
- }
479
- // }
480
- }
481
- }
482
- if (lastCurrentIds !== currentIds && lastCurrentIds !== '') { // 当前相位id和上一个相比不同说明相位变化了
483
- phaseList.push(lastCurrentIds)
484
- this.stateList.push(j)// 阶段累计长度的集合
485
- }
486
- lastCurrentIds = currentIds
487
- currentIds = ''
488
- }
489
- let newPhaselist = []
490
- phaseList.forEach(i => {
491
- let rangeArr = i.split('-').map(Number)
492
- if (rangeArr.length > 2) {
493
- newPhaselist.push([
494
- JSON.parse(JSON.stringify(rangeArr[1])),
495
- JSON.parse(JSON.stringify(rangeArr[2]))
496
- ])
497
- } else {
498
- newPhaselist.push([
499
- JSON.parse(JSON.stringify(rangeArr[1]))
500
- ])
501
- }
502
- })
503
- for (let i = this.stateList.length - 1; i >= 1; i--) {
504
- this.narr.push(this.stateList[i] - this.stateList[i - 1])
505
- }
506
- // newPhaselist
507
- this.narr.reverse()// 阶段差
508
- for (let i = 0; i < newPhaselist.length; i++) {
509
- let stage = JSON.parse(JSON.stringify(newPhaselist[i]))
510
- let newStage = []
511
- stage.map(item => {
512
- for (let ring of rings) {
513
- for (let ringItem of ring) {
514
- if (item === ringItem.id && (ringItem.mode !== 7 && ringItem.mode !== 8 && ringItem.mode !== 9)) {
515
- newStage.push(item)
516
- }
517
- }
518
- }
519
- })
520
- let stageItem = this.getStageItem(newStage, stage, rings, i)
521
- stagesList.push(JSON.parse(JSON.stringify(stageItem)))
522
- }
523
- this.overLapCycle = stagesList.reduce((prev, curr) => prev + parseInt(curr.split), 0)
524
- this.stagesList = JSON.parse(JSON.stringify(stagesList))
525
- }
526
- }
527
- },
528
- getCycle () {
529
- for (let rings of this.planPattern.rings) {
530
- let num = 0
531
- for (let i = 0; i < rings.length; i++) {
532
- if (rings[i].length !== 0) {
533
- if (rings[i].mode === 7) { // 忽略相位不计周期
534
- continue
535
- }
536
- num = num + Number(rings[i].value)
537
- }
538
- }
539
- if (num !== 0) {
540
- this.planPattern.cycle = num
541
- break
542
- }
543
- }
544
- },
545
- patternPlan () {
546
- let Pattern = {
547
- offset: 0,
548
- cycle: 0,
549
- stagesList: [],
550
- rings: [[], [], [], []]
551
- }
552
- var newPattern = JSON.parse(JSON.stringify(Pattern))
553
- for (let phase of this.phaseList) {
554
- let ring = {}
555
- ring.name = 'Phase ' + phase.id
556
- // ring.desc = this.getPhaseDescription(phase.direction)
557
- ring.id = phase.id
558
- ring.value = 30
559
- ring.mode = 2
560
- ring.options = []
561
- ring.delaystart = 0
562
- ring.advanceend = 0
563
- if (phase.ring === 1) {
564
- newPattern.rings[0].push(ring)
565
- } else if (phase.ring === 2) {
566
- newPattern.rings[1].push(ring)
567
- } else if (phase.ring === 3) {
568
- newPattern.rings[2].push(ring)
569
- } else if (phase.ring === 4) {
570
- newPattern.rings[3].push(ring)
571
- }
572
- }
573
- let barrier = this.handleCurrentChange(newPattern.rings)
574
- newPattern.barriers = barrier
575
- this.planPattern = newPattern
576
- },
577
- tranform (arr) { // 分barrier
578
- let newMap = new Map()
579
- arr.forEach(({ id, current }) => {
580
- const find = newMap.get(current.join())
581
- if (find) newMap.get(current.join()).push(id)
582
- else newMap.set(current.join(), [id])
583
- })
584
- let ret = []
585
- newMap.forEach((value, key) => {
586
- ret.push(Array.from(new Set(key.split(',').map(Number).concat(value))))
587
- })
588
- const result = []
589
- for (const a of ret) {
590
- let merged = false
591
- for (const r of result) {
592
- if (this.check([...r], a)) {
593
- a.forEach(item => r.add(item))
594
- merged = true
595
- }
596
- }
597
- if (!merged) {
598
- result.push(new Set(a))
599
- }
600
- merged = false
601
- }
602
- return result.map(s => [...s])
603
- },
604
- handleCurrentChange (val) { // 两个ring的数据
605
- if (val === null || val.length === 0) return
606
- // 按环序分组
607
- let ringlength = []
608
- let ringsequence = val.map(item => {
609
- if (item.length === 0) return
610
- ringlength.push(item.length)
611
- return item.map(k => {
612
- return k.id
613
- })
614
- })
615
- let newRings = ringsequence.filter(item => item)
616
- let minLength = Math.min(...ringlength)
617
- let resultArrs = [] // 环1分组
618
- let resultArr = [] // 环2分组
619
- for (let j = 0; j < ringsequence[0].length; j += minLength) {
620
- resultArrs.push(ringsequence[0].slice(j, j + minLength))
621
- if (ringsequence[0].length === minLength) {
622
- resultArrs.push([])
623
- }
624
- }
625
- if (newRings.length > 1) {
626
- for (let i = 0; i < ringsequence[1].length; i += minLength) {
627
- resultArr.push(ringsequence[1].slice(i, i + minLength))
628
- }
629
- }
630
- // this.patternInfo = []
631
- // this.barrierList = []
632
- let currentArr = []
633
- let newPattern = []
634
- val.map(i => {
635
- newPattern.push(...i)
636
- })
637
- if (this.phaseList.length === 0) return
638
- for (let patternStatus of val[0]) {
639
- // if (patternStatus.mode !== 7) {
640
- let concurrent = this.phaseList.filter((item) => {
641
- return item.id === patternStatus.id // patternStatus.id当前相位id concurrent当前相位的并发相位
642
- })[0].concurrent// 当前相位的并发相位
643
- if (concurrent) {
644
- let obj = {
645
- id: patternStatus.id,
646
- current: concurrent.sort()
647
- }
648
- currentArr.push(obj)
649
- }
650
- // }
651
- }
652
- if (currentArr.length !== 0) {
653
- let newCurrent = this.tranform(currentArr)
654
- // 取没个环与环关系的并集
655
- let barrierRing1 = []
656
- let barrierRing2 = []
657
- let ring1 = [] // 环1与关系1的并集
658
- for (let h = 0; h < newCurrent.length; h++) {
659
- let adds = [...new Set(resultArrs[0])].filter(item => newCurrent[h].includes(item))
660
- ring1.push(adds)
661
- }
662
- let ring1s = [] // 环1与关系2的并集
663
- for (let h = 0; h < newCurrent.length; h++) {
664
- let addRing1 = [...new Set(resultArrs[1])].filter(item => newCurrent[h].includes(item))
665
- ring1s.push(addRing1)
666
- }
667
- barrierRing1.push(...ring1, ...ring1s)
668
- let resultList = []
669
- if (newRings.length > 1) {
670
- let ring2s = [] // 环2与关系1的并集
671
- for (let h = 0; h < newCurrent.length; h++) {
672
- let addRing2 = [...new Set(resultArr[1])].filter(item => newCurrent[h].includes(item))
673
- ring2s.push(addRing2)
674
- }
675
- let ring2 = [] // 环2与关系1的并集
676
- for (let h = 0; h < newCurrent.length; h++) {
677
- let add = [...new Set(resultArr[0])].filter(item => newCurrent[h].includes(item))
678
- ring2.push(add)
679
- }
680
- barrierRing2.push(...ring2, ...ring2s)
681
- for (let k = 0; k < barrierRing1.length; k++) {
682
- resultList.push(barrierRing1[k].concat(barrierRing2[k]))
683
- }
684
- }
685
- let resultLists = resultList.filter(item => item.length !== 0)
686
- let ringArr = []
687
- for (let l = 0; l < resultLists.length; l++) {
688
- for (let d = 0; d < newCurrent.length; d++) {
689
- if (newCurrent[d].filter(item => resultLists[l].includes(item)).length > 0) {
690
- ringArr.push({
691
- data: resultLists[l],
692
- id: d + 1,
693
- index: l
694
- })
695
- }
696
- }
697
- }
698
- for (var i = 0; i < ringArr.length; i++) {
699
- for (var j = i + 1; j < ringArr.length; j++) {
700
- if (ringArr[i].id === ringArr[j].id && ringArr[i].index + 1 === ringArr[j].index) {
701
- ringArr[i].data = ringArr[i].data.concat(ringArr[j].data)
702
- ringArr.splice(ringArr.indexOf(ringArr[j].id), 1)
703
- }
704
- }
705
- }
706
- let resArr = ringArr.map(item => item.data)
707
- let ringTeam = this.step1(this.phaseList, resArr)
708
- let ringTeams = ringTeam.filter(item => item.length !== 0)
709
- return this.setBarrier(ringTeams, val)
710
- }
711
- },
712
- setBarrier (ringTeam, val) {
713
- const patternObjs = {}
714
- val.forEach(l => {
715
- l.map(k => {
716
- patternObjs[k.id] = k.value
717
- })
718
- })
719
- let ret = ringTeam.map((y, index) => {
720
- if (!y || y.length === 0) return
721
- y.map(n => {
722
- n.length = n.data.length > 1 ? n.data.reduce((pre, cur) => pre + patternObjs[cur], 0) : patternObjs[n.data[0]]
723
- })
724
- return {
725
- barrier: index + 1,
726
- length: y[0].length,
727
- items: y.map(j => {
728
- return {
729
- ring: j.ring,
730
- data: j.data
731
- }
732
- })
733
- }
734
- })
735
- return ret
736
- },
737
- step1 (list, arr) { // 各个环包含的相位
738
- const ret = []
739
- const listObj = {}
740
- list.forEach(l => {
741
- listObj[l.id] = l.ring
742
- })
743
- arr.forEach(a => {
744
- const retItem = []
745
- a.forEach(b => {
746
- if (listObj[b]) {
747
- const find = retItem.find(r => r.ring === listObj[b])
748
- if (find) find.data.push(b)
749
- else retItem.push({ ring: listObj[b], data: [b] })
750
- }
751
- })
752
- ret.push(retItem)
753
- })
754
- return ret
755
- },
756
- getStageItem (stageArr, stage, ringsList, i) {
757
- let res = {
758
- key: i,
759
- split: this.narr[i], // 阶段绿性比
760
- phases: stageArr,
761
- stageKanban: stage,
762
- delaystart: 0,
763
- advanceend: 0
764
- }
765
- // let splitArr = []
766
- let delaystartArr = []
767
- let advanceendArr = []
768
- for (let rings of ringsList) {
769
- for (let ring of rings) {
770
- if (stageArr.includes(ring.id)) {
771
- // let split = ring.value
772
- let delaystart = ring.delaystart
773
- let advanceend = ring.advanceend
774
- // splitArr.push(split)
775
- delaystartArr.push(delaystart)
776
- advanceendArr.push(advanceend)
777
- }
778
- }
779
- }
780
- // splitArr.sort(function (a, b) { return a - b })
781
- delaystartArr.sort(function (a, b) { return b - a })
782
- advanceendArr.sort(function (a, b) { return a - b })
783
- // res.split = splitArr.length > 0 ? splitArr[0] : 0
784
- res.delaystart = delaystartArr.length > 0 ? delaystartArr[0] : 0
785
- res.advanceend = advanceendArr.length > 0 ? advanceendArr[0] : 0
786
- return res
787
- },
788
- changeStage (value) {
789
- if (value) {
790
- this.manualsStage = {}
791
- this.manuals = true
792
- let stages = []
793
- let secletIds = isNaN(parseInt(value)) ? Number(value.replace(/[^0-9]/ig, '')) : value
794
- stages = this.patternAll.filter(item => {
795
- return item.id === secletIds
796
- })[0].stages
797
- this.manualsStage.stages = stages
798
- } else {
799
- this.manuals = false
800
- this.realtimeStage = JSON.parse(JSON.stringify(this.crossStatusData))
801
- }
802
- },
803
- handleClose () {
804
- this.$emit('closeManualModal')
805
- },
806
- handleManualControl () {
807
- this.$emit('patternCommit', this.manualInfo)
808
- },
809
- selectModel (item) {
810
- this.preselecttype = item.type
811
- this.manualInfo.fromControl = item.id
812
- if (item.iconClass === 'jieduansuoding') {
813
- this.manualInfo.fromControl = 40
814
- }
815
- this.$emit('selectModel', item.id)
816
- },
817
- selectStages (value) {
818
- this.$emit('selectStages', value)
819
- },
820
- selectSpecialModel () {
821
- this.$emit('selectSpecialModel')
822
- },
823
- init (tab) {
824
- this.$refs.ControlModelGroup.init()
825
- if (!tab) return
826
- if (this.controlData.patternid) {
827
- this.manualInfo.tempPatternid = this.controlData.patternid
828
- }
829
- if (this.controlData.tempDuration) {
830
- this.manualInfo.tempDuration = this.controlData.duration
831
- }
832
- if (tab.name === 'schemeselection') {
833
- this.initPattern()
834
- this.selectPattern()
835
- }
836
- },
837
- closePhaseBack () {
838
- this.$emit('closePhaseBack')
839
- },
840
- closePhaseControl (controldata) {
841
- this.$emit('closePhaseControl', controldata)
842
- },
843
- initPattern () {
844
- this.patternPlan()
845
- this.getCycle()
846
- if (this.patternOne.length === 0) {
847
- this.handleStageData(this.planPattern.rings)
848
- }
849
- },
850
- toAutoControl () {
851
- let autonomyControl = {
852
- id: 0,
853
- iconClass: 'zizhukongzhi',
854
- permission: 'configer:manual:renew',
855
- iconName: '自主控制'
856
- }
857
- this.$emit('selectModel', autonomyControl.id)
858
- this.handleManualControl()
859
- }
860
- },
861
- mounted () {
862
- }
863
- }
864
- </script>
1
+ /**
2
+ * Copyright (c) 2020 kedacom
3
+ * OpenATC is licensed under Mulan PSL v2.
4
+ * You can use this software according to the terms and conditions of the Mulan PSL v2.
5
+ * You may obtain a copy of Mulan PSL v2 at:
6
+ * http://license.coscl.org.cn/MulanPSL2
7
+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
8
+ * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
9
+ * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
10
+ * See the Mulan PSL v2 for more details.
11
+ **/
12
+ <template>
13
+ <div class="manual-control-modal-new">
14
+ <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
15
+ <el-tab-pane :label="$t('openatccomponents.overview.residentcontrol')" name="residentcontrol">
16
+ <ControlModelGroup
17
+ v-if="activeName === 'residentcontrol'"
18
+ ref="ControlModelGroup"
19
+ className="residentcontrol"
20
+ :controlList="residentControlList"
21
+ :funcSort="funcSort"
22
+ @selectModel="selectModel"
23
+ />
24
+
25
+ <div class="common-config" v-if="activeName === 'residentcontrol' && preselecttype !== '相位锁定' && preselecttype !== '方向锁定'">
26
+ <el-form
27
+ ref="manual"
28
+ label-position="left"
29
+ :model="manualInfo"
30
+ label-width="90px">
31
+ <el-form-item
32
+ :label="$t('openatccomponents.overview.duration')"
33
+ prop="count">
34
+ <el-input-number style="width: 170px;" v-model="manualInfo.tempDuration" :controls="false" :max="65535" :min="0" :precision="0" :step="1" :placeholder="$t('openatccomponents.common.input')" size="small"></el-input-number>
35
+ </el-form-item>
36
+ </el-form>
37
+ </div>
38
+
39
+ <div class="stage-part" v-if="preselecttype === '阶段锁定'">
40
+ <div class="stage-label">{{$t('openatccomponents.overview.stage')}}</div>
41
+ <div style="width: 100%; height: auto;overflow: hidden;" v-if="isHasPermission('configer:manual:dwell')">
42
+ <Stages :crossStatusData="manuals?manualsStage:realtimeStage"
43
+ :phaseList="phaseList"
44
+ :preselectStages="preselectStages"
45
+ :preselectModel="preselectModel"
46
+ :isShowCurrentStage="false"
47
+ @onSelectStages="selectStages"></Stages>
48
+ </div>
49
+ </div>
50
+
51
+ <LockingPhaseControlModal
52
+ v-if="preselecttype === '相位锁定'"
53
+ :roadDirection="roadDirection"
54
+ :phaseList="phaseList"
55
+ :patternStatus="statusData"
56
+ :lockPhaseBtnName="lockPhaseBtnName"
57
+ :isShowBack="isShowBack"
58
+ :isShowRecovery="isShowRecovery"
59
+ @closePhaseBack="handleClose"
60
+ @closePhaseControl="closePhaseControl"
61
+ @toAutoControl="toAutoControl" />
62
+
63
+ <AzimuthLocking
64
+ v-if="preselecttype === '方向锁定'"
65
+ :realtimeStatusModalvisible="realtimeStatusModalvisible"
66
+ :phaseList="phaseList"
67
+ :patternStatus="statusData"
68
+ :isShowBack="isShowBack"
69
+ :isShowRecovery="isShowRecovery"
70
+ @closePhaseBack="handleClose"
71
+ @toAutoControl="toAutoControl"
72
+ />
73
+
74
+ <div class="footer" v-if="realtimeStatusModalvisible && ((activeName === 'residentcontrol' && preselecttype !== '相位锁定' && preselecttype !== '方向锁定') || activeName === 'specialcontrol' || activeName === 'schemeselection')">
75
+ <el-button v-if="isShowBack" @click="handleClose()">{{$t('openatccomponents.button.Back')}}</el-button>
76
+ <el-button @click="toAutoControl()" v-if="isShowRecovery && isHasPermission('configer:manual:renew')">{{$t('openatccomponents.overview.recovery')}}</el-button>
77
+ <el-button type="primary" @click="handleManualControl()">{{$t('openatccomponents.overview.implement')}}</el-button>
78
+ </div>
79
+ <div class="footer" v-if="!realtimeStatusModalvisible && ((activeName === 'residentcontrol' && preselecttype !== '相位锁定' && preselecttype !== '方向锁定') || activeName === 'specialcontrol' || activeName === 'schemeselection')">
80
+ <el-button @click="toAutoControl()" v-if="isShowRecovery && isHasPermission('configer:manual:renew')">{{$t('openatccomponents.overview.recovery')}}</el-button>
81
+ <el-button class="3" type="primary" @click="handleManualControl()">{{$t('openatccomponents.overview.comfirm')}}</el-button>
82
+ </div>
83
+ </el-tab-pane>
84
+ <el-tab-pane :label="$t('openatccomponents.overview.specialcontrol')" name="specialcontrol">
85
+ <ControlModelGroup
86
+ v-if="activeName === 'specialcontrol'"
87
+ ref="ControlModelGroup"
88
+ className="specialcontrol"
89
+ :controlList="specialControlList"
90
+ :funcSort="funcSort"
91
+ @selectModel="selectModel"
92
+ />
93
+
94
+ <div class="common-config">
95
+ <el-form
96
+ ref="manual"
97
+ label-position="left"
98
+ :model="manualInfo"
99
+ label-width="90px">
100
+ <el-form-item
101
+ :label="$t('openatccomponents.overview.duration')"
102
+ prop="count">
103
+ <el-input-number style="width: 170px;" v-model="manualInfo.tempDuration" :controls="false" :max="65535" :min="0" :precision="0" :step="1" :placeholder="$t('openatccomponents.common.input')" size="small"></el-input-number>
104
+ </el-form-item>
105
+ </el-form>
106
+ </div>
107
+
108
+ <div class="footer" v-if="realtimeStatusModalvisible && ((activeName === 'residentcontrol' && preselecttype !== '相位锁定' && preselecttype !== '方向锁定') || activeName === 'specialcontrol' || activeName === 'schemeselection')">
109
+ <el-button v-if="isShowBack" @click="handleClose()">{{$t('openatccomponents.button.Back')}}</el-button>
110
+ <el-button @click="toAutoControl()" v-if="isShowRecovery && isHasPermission('configer:manual:renew')">{{$t('openatccomponents.overview.recovery')}}</el-button>
111
+ <el-button type="primary" @click="handleManualControl()">{{$t('openatccomponents.overview.implement')}}</el-button>
112
+ </div>
113
+ <div class="footer" v-if="!realtimeStatusModalvisible && ((activeName === 'residentcontrol' && preselecttype !== '相位锁定' && preselecttype !== '方向锁定') || activeName === 'specialcontrol' || activeName === 'schemeselection')">
114
+ <el-button @click="toAutoControl()" v-if="isShowRecovery && isHasPermission('configer:manual:renew')">{{$t('openatccomponents.overview.recovery')}}</el-button>
115
+ <el-button class="3" type="primary" @click="handleManualControl()">{{$t('openatccomponents.overview.comfirm')}}</el-button>
116
+ </div>
117
+
118
+ </el-tab-pane>
119
+ <el-tab-pane :label="$t('openatccomponents.overview.schemeselection')" name="schemeselection">
120
+ <ControlModelGroup
121
+ v-if="activeName === 'schemeselection'"
122
+ ref="ControlModelGroup"
123
+ className="otherscontrol"
124
+ :controlList="patternChooseControlList"
125
+ :funcSort="funcSort"
126
+ @selectModel="selectModel"
127
+ @selectSpecialModel="selectSpecialModel" />
128
+
129
+ <div class="common-config" v-if="activeName === 'schemeselection'">
130
+ <el-form
131
+ ref="manual"
132
+ label-position="left"
133
+ :model="manualInfo"
134
+ label-width="90px">
135
+ <el-form-item
136
+ :label="$t('openatccomponents.overview.duration')"
137
+ prop="count">
138
+ <el-input-number style="width: 170px;" v-model="manualInfo.tempDuration" :controls="false" :max="65535" :min="0" :precision="0" :step="1" :placeholder="$t('openatccomponents.common.input')" size="small"></el-input-number>
139
+ </el-form-item>
140
+ <el-form-item
141
+ :label="$t('openatccomponents.overview.controlnumber')"
142
+ prop="shape">
143
+ <el-select style="width: 170px;" v-model="manualInfo.tempPatternid" @change="handleSelectPatternOption" class="col-inner" size="small" :placeholder="$t('openatccomponents.common.select')">
144
+ <el-option
145
+ v-for="item in patternSelect"
146
+ :key="item.value"
147
+ :label="item.label"
148
+ :value="item.value">
149
+ </el-option>
150
+ </el-select>
151
+ </el-form-item>
152
+ </el-form>
153
+
154
+ <div>
155
+ <pattern-list
156
+ :key="keyChange"
157
+ :allPatternList="allPatternList"
158
+ :contrloType="!this.isRing ? 'ring' : 'stage'"
159
+ :stagesChange="
160
+ patternOne.length === 0
161
+ ? planPattern.stagesList
162
+ : patternOne[0].stagesList
163
+ "
164
+ :patternList="patternOne.length === 0 ? planPattern.rings : patternOne"
165
+ :patternStatusList="
166
+ patternOne.length === 0 ? planPattern.rings : patternOne[0].rings
167
+ "
168
+ :cycles="
169
+ patternOne.length === 0 ? planPattern.cycle : patternOne[0].cycle
170
+ "
171
+ :phaseList="phaseList"
172
+ >
173
+ </pattern-list>
174
+ </div>
175
+ </div>
176
+
177
+ <div class="footer" v-if="realtimeStatusModalvisible && ((activeName === 'residentcontrol' && preselecttype !== '相位锁定' && preselecttype !== '方向锁定') || activeName === 'specialcontrol' || activeName === 'schemeselection')">
178
+ <el-button v-if="isShowBack" @click="handleClose()">{{$t('openatccomponents.button.Back')}}</el-button>
179
+ <el-button @click="toAutoControl()" v-if="isShowRecovery && isHasPermission('configer:manual:renew')">{{$t('openatccomponents.overview.recovery')}}</el-button>
180
+ <el-button type="primary" @click="handleManualControl()">{{$t('openatccomponents.overview.implement')}}</el-button>
181
+ </div>
182
+ <div class="footer" v-if="!realtimeStatusModalvisible && ((activeName === 'residentcontrol' && preselecttype !== '相位锁定' && preselecttype !== '方向锁定') || activeName === 'specialcontrol' || activeName === 'schemeselection')">
183
+ <el-button @click="toAutoControl()" v-if="isShowRecovery && isHasPermission('configer:manual:renew')">{{$t('openatccomponents.overview.recovery')}}</el-button>
184
+ <el-button class="3" type="primary" @click="handleManualControl()">{{$t('openatccomponents.overview.comfirm')}}</el-button>
185
+ </div>
186
+ </el-tab-pane>
187
+ <el-tab-pane :label="$t('openatccomponents.overview.others')" name="others">
188
+ <ControlModelGroup
189
+ v-if="activeName === 'others'"
190
+ ref="ControlModelGroup"
191
+ className="otherscontrol"
192
+ othersControl
193
+ :controlList="othersControlList"
194
+ :funcSort="funcSort"
195
+ @selectModel="selectModel"
196
+ @selectSpecialModel="selectSpecialModel"
197
+ />
198
+ <ClosePhaseControlModal
199
+ v-if="preselecttype === '相位关断'"
200
+ :controlData="controlData"
201
+ :closePhaseRings="closePhaseRings"
202
+ :sidewalkPhaseData="sidewalkPhaseData"
203
+ :realtimeStatusModalvisible="realtimeStatusModalvisible"
204
+ :roadDirection="roadDirection"
205
+ :isShowBack="isShowBack"
206
+ :isShowRecovery="isShowRecovery"
207
+ @closePhaseBack="handleClose"
208
+ @closePhaseControl="closePhaseControl"
209
+ @toAutoControl="toAutoControl" />
210
+ <TentativePlanControlModal
211
+ v-if="preselecttype === '临时方案'"
212
+ :realtimeStatusModalvisible="realtimeStatusModalvisible"
213
+ :controlData="controlData"
214
+ :phaseList="phaseList"
215
+ :overlap="overlap"
216
+ :patternSelect="patternSelect"
217
+ :allPatternList="allPatternList"
218
+ :isShowBack="isShowBack"
219
+ :isShowRecovery="isShowRecovery"
220
+ @closePhaseBack="handleClose"
221
+ @closePhaseControl="closePhaseControl"
222
+ @toAutoControl="toAutoControl"
223
+ />
224
+ <PriorityControl
225
+ v-if="preselecttype === '优先控制'"
226
+ :realtimeStatusModalvisible="realtimeStatusModalvisible"
227
+ :phaseList="phaseList"
228
+ :isShowBack="isShowBack"
229
+ :isShowRecovery="isShowRecovery"
230
+ @closePhaseBack="handleClose"
231
+ @closePhaseControl="closePhaseControl"
232
+ @toAutoControl="toAutoControl"
233
+ />
234
+ </el-tab-pane>
235
+ </el-tabs>
236
+ </div>
237
+ </template>
238
+
239
+ <script>
240
+ import xdrdirselector from '../../XRDDirSelector/XRDDirSelector'
241
+ import Stages from '../../Stages/index'
242
+ import { hasPermission } from '../../../../utils/auth'
243
+ import LockingPhaseControlModal from '../lockingPhaselControlModal'
244
+ import AzimuthLocking from '../azimuthlocking'
245
+ import ControlModelGroup from './controlModelGroup'
246
+ import ClosePhaseControlModal from '../closePhaselControlModal'
247
+ import TentativePlanControlModal from '../tentativeplancontrolmodal'
248
+ import PriorityControl from '../priorityControl'
249
+
250
+ export default {
251
+ name: 'manualControl',
252
+ components: {
253
+ xdrdirselector,
254
+ Stages,
255
+ LockingPhaseControlModal,
256
+ AzimuthLocking,
257
+ ControlModelGroup,
258
+ ClosePhaseControlModal,
259
+ TentativePlanControlModal,
260
+ PriorityControl
261
+ },
262
+ props: {
263
+ patternAll: {
264
+ type: Array
265
+ },
266
+ crossStatusData: {
267
+ type: Object,
268
+ default: () => {}
269
+ },
270
+ phaseList: {
271
+ type: Array,
272
+ default () {
273
+ return []
274
+ }
275
+ },
276
+ Visible: {
277
+ type: Boolean
278
+ },
279
+ controlData: {
280
+ type: Object
281
+ },
282
+ modelList: {
283
+ type: Array
284
+ },
285
+ residentControlList: {
286
+ type: Array
287
+ },
288
+ // stagesList: {
289
+ // type: Array
290
+ // },
291
+ patternSelect: {
292
+ type: Array
293
+ },
294
+ currModel: {
295
+ type: Number
296
+ },
297
+ preselectModel: {
298
+ type: Number
299
+ },
300
+ currentStage: {
301
+ type: Number
302
+ },
303
+ preselectStages: {
304
+ type: Number
305
+ },
306
+ specialcontrolList: {
307
+ type: Array
308
+ },
309
+ realtimeStatusModalvisible: { // 区分是保存方案还是提交方案,保存方案没有路口实时信息
310
+ type: Boolean,
311
+ default: true
312
+ },
313
+ funcSort: {
314
+ type: String,
315
+ default: 'allFunc'
316
+ },
317
+ roadDirection: {
318
+ type: String
319
+ },
320
+ statusData: {
321
+ type: Object
322
+ },
323
+ lockPhaseBtnName: {
324
+ type: String
325
+ },
326
+ specialControlList: {
327
+ type: Array
328
+ },
329
+ othersControlList: {
330
+ type: Array
331
+ },
332
+ closePhaseRings: {
333
+ type: Array
334
+ },
335
+ sidewalkPhaseData: {
336
+ type: Array
337
+ },
338
+ overlap: {
339
+ type: Array
340
+ },
341
+ allPatternList: {
342
+ type: Array
343
+ },
344
+ patternChooseControlList: {
345
+ type: Array
346
+ },
347
+ isShowBack: {
348
+ type: Boolean,
349
+ default: true
350
+ },
351
+ isShowRecovery: {
352
+ type: Boolean,
353
+ default: true
354
+ }
355
+ },
356
+ watch: {
357
+ activeName: {
358
+ handler: function (val) {
359
+ },
360
+ // 深度观察监听
361
+ deep: true
362
+ },
363
+ patternSelect: {
364
+ handler: function (val) {
365
+ this.manualInfo.tempPatternid = this.crossStatusData.patternid
366
+ },
367
+ // 深度观察监听
368
+ deep: true
369
+ },
370
+ crossStatusData: {
371
+ handler: function (val) {
372
+ this.manualInfo.tempPatternid = this.manualInfo.tempPatternid ? this.manualInfo.tempPatternid : val.patternid
373
+ this.realtimeStage = JSON.parse(JSON.stringify(this.crossStatusData))
374
+ },
375
+ // 深度观察监听
376
+ deep: true
377
+ }
378
+ },
379
+ data () {
380
+ return {
381
+ basicFuncControlId: [0, 1, 4, 5], // 基础功能包含的控制方式: 自主控制(手动下)、黄闪、步进、定周期
382
+ visible: this.Visible,
383
+ manuals: false,
384
+ realtimeStage: {},
385
+ manualsStage: {},
386
+ manualInfo: {
387
+ tempPatternid: '', // 控制方式手动操作的情况下的控制编号的临时值。
388
+ // tempDelay: 0, // 控制方式手动操作的情况下的延迟时间的临时值。
389
+ tempDuration: 300 // 控制方式手动操作的情况下的持续时间的临时值。
390
+ },
391
+ activeName: 'residentcontrol',
392
+ preselecttype: '',
393
+ keyChange: false,
394
+ isRing: false,
395
+ patternOne: [],
396
+ planPattern: {}
397
+ }
398
+ },
399
+ methods: {
400
+ handleClick (tab, event) {
401
+ this.$nextTick(() => {
402
+ this.init(tab)
403
+ })
404
+ },
405
+ isHasPermission (path) {
406
+ let res = hasPermission(path)
407
+ return res
408
+ },
409
+ handleSelectPatternOption (value) {
410
+ if (value === '') {
411
+ this.manualInfo.tempPatternid = 0
412
+ return
413
+ }
414
+ this.changeStage(value)
415
+ this.selectPattern()
416
+ },
417
+ selectPattern () {
418
+ this.manualInfo.offset = 0
419
+ let selectId = Number(this.manualInfo.tempPatternid)
420
+ this.patternOne = this.allPatternList.filter(item => {
421
+ return item.id === selectId
422
+ })
423
+ this.manualInfo.offset = this.offset
424
+ for (let rings of this.patternOne[0].rings) {
425
+ if (rings.length === 0) continue
426
+ for (let ring of rings) {
427
+ if (ring.value === 0) continue
428
+ let currPhase = this.phaseList.filter((item) => {
429
+ return item.id === ring.id
430
+ })[0]
431
+ ring.desc = currPhase.direction.map(item => {
432
+ return {
433
+ id: item,
434
+ color: '#454545'
435
+ }
436
+ })
437
+ }
438
+ }
439
+ this.handleStageData(this.patternOne[0].rings)
440
+ },
441
+ handleStageData (rings) { // stagesList
442
+ if (!rings) return
443
+ for (let i = 0; i < rings.length; i++) {
444
+ if (rings[i].length > 0) {
445
+ let phaseList = []
446
+ let stagesList = []
447
+ // rings = JSON.parse(JSON.stringify(rings))
448
+ let mapAdd = rings.map(item => {
449
+ return item.map(val => {
450
+ // if (val.mode !== 7) {
451
+ return val.value + (val.sum ? val.sum : 0)
452
+ // } else {
453
+ // return 0
454
+ // }
455
+ })
456
+ })
457
+ let maxCycle = mapAdd.length > 0 ? mapAdd.map(item => {
458
+ return item.length > 0 ? item.reduce((a, b) => {
459
+ return a + b
460
+ }) : 0
461
+ }) : 0
462
+ this.max = Math.max(...maxCycle)// 每个环的周期最大值
463
+ this.stateList = [0]
464
+ this.narr = []
465
+ let currentIds = ''
466
+ let lastCurrentIds = ''
467
+ for (let j = 0; j <= this.max; j++) { // 指针长度
468
+ for (let i = 0; i < rings.length; i++) { // 环列表
469
+ let ring = rings[i]// 每个环对象
470
+ let sum = 0
471
+ for (let n = 0; n < ring.length; n++) { // 相位累计长度
472
+ // if (ring[n].mode !== 7) {
473
+ sum = sum + ring[n].value + (ring[n].sum ? ring[n].sum : 0)
474
+ if (j < sum) {
475
+ let phaseId = ring[n].id
476
+ currentIds = currentIds + '-' + phaseId
477
+ break
478
+ }
479
+ // }
480
+ }
481
+ }
482
+ if (lastCurrentIds !== currentIds && lastCurrentIds !== '') { // 当前相位id和上一个相比不同说明相位变化了
483
+ phaseList.push(lastCurrentIds)
484
+ this.stateList.push(j)// 阶段累计长度的集合
485
+ }
486
+ lastCurrentIds = currentIds
487
+ currentIds = ''
488
+ }
489
+ let newPhaselist = []
490
+ phaseList.forEach(i => {
491
+ let rangeArr = i.split('-').map(Number)
492
+ if (rangeArr.length > 2) {
493
+ newPhaselist.push([
494
+ JSON.parse(JSON.stringify(rangeArr[1])),
495
+ JSON.parse(JSON.stringify(rangeArr[2]))
496
+ ])
497
+ } else {
498
+ newPhaselist.push([
499
+ JSON.parse(JSON.stringify(rangeArr[1]))
500
+ ])
501
+ }
502
+ })
503
+ for (let i = this.stateList.length - 1; i >= 1; i--) {
504
+ this.narr.push(this.stateList[i] - this.stateList[i - 1])
505
+ }
506
+ // newPhaselist
507
+ this.narr.reverse()// 阶段差
508
+ for (let i = 0; i < newPhaselist.length; i++) {
509
+ let stage = JSON.parse(JSON.stringify(newPhaselist[i]))
510
+ let newStage = []
511
+ stage.map(item => {
512
+ for (let ring of rings) {
513
+ for (let ringItem of ring) {
514
+ if (item === ringItem.id && (ringItem.mode !== 7 && ringItem.mode !== 8 && ringItem.mode !== 9)) {
515
+ newStage.push(item)
516
+ }
517
+ }
518
+ }
519
+ })
520
+ let stageItem = this.getStageItem(newStage, stage, rings, i)
521
+ stagesList.push(JSON.parse(JSON.stringify(stageItem)))
522
+ }
523
+ this.overLapCycle = stagesList.reduce((prev, curr) => prev + parseInt(curr.split), 0)
524
+ this.stagesList = JSON.parse(JSON.stringify(stagesList))
525
+ }
526
+ }
527
+ },
528
+ getCycle () {
529
+ for (let rings of this.planPattern.rings) {
530
+ let num = 0
531
+ for (let i = 0; i < rings.length; i++) {
532
+ if (rings[i].length !== 0) {
533
+ if (rings[i].mode === 7) { // 忽略相位不计周期
534
+ continue
535
+ }
536
+ num = num + Number(rings[i].value)
537
+ }
538
+ }
539
+ if (num !== 0) {
540
+ this.planPattern.cycle = num
541
+ break
542
+ }
543
+ }
544
+ },
545
+ patternPlan () {
546
+ let Pattern = {
547
+ offset: 0,
548
+ cycle: 0,
549
+ stagesList: [],
550
+ rings: [[], [], [], []]
551
+ }
552
+ var newPattern = JSON.parse(JSON.stringify(Pattern))
553
+ for (let phase of this.phaseList) {
554
+ let ring = {}
555
+ ring.name = 'Phase ' + phase.id
556
+ // ring.desc = this.getPhaseDescription(phase.direction)
557
+ ring.id = phase.id
558
+ ring.value = 30
559
+ ring.mode = 2
560
+ ring.options = []
561
+ ring.delaystart = 0
562
+ ring.advanceend = 0
563
+ if (phase.ring === 1) {
564
+ newPattern.rings[0].push(ring)
565
+ } else if (phase.ring === 2) {
566
+ newPattern.rings[1].push(ring)
567
+ } else if (phase.ring === 3) {
568
+ newPattern.rings[2].push(ring)
569
+ } else if (phase.ring === 4) {
570
+ newPattern.rings[3].push(ring)
571
+ }
572
+ }
573
+ let barrier = this.handleCurrentChange(newPattern.rings)
574
+ newPattern.barriers = barrier
575
+ this.planPattern = newPattern
576
+ },
577
+ tranform (arr) { // 分barrier
578
+ let newMap = new Map()
579
+ arr.forEach(({ id, current }) => {
580
+ const find = newMap.get(current.join())
581
+ if (find) newMap.get(current.join()).push(id)
582
+ else newMap.set(current.join(), [id])
583
+ })
584
+ let ret = []
585
+ newMap.forEach((value, key) => {
586
+ ret.push(Array.from(new Set(key.split(',').map(Number).concat(value))))
587
+ })
588
+ const result = []
589
+ for (const a of ret) {
590
+ let merged = false
591
+ for (const r of result) {
592
+ if (this.check([...r], a)) {
593
+ a.forEach(item => r.add(item))
594
+ merged = true
595
+ }
596
+ }
597
+ if (!merged) {
598
+ result.push(new Set(a))
599
+ }
600
+ merged = false
601
+ }
602
+ return result.map(s => [...s])
603
+ },
604
+ handleCurrentChange (val) { // 两个ring的数据
605
+ if (val === null || val.length === 0) return
606
+ // 按环序分组
607
+ let ringlength = []
608
+ let ringsequence = val.map(item => {
609
+ if (item.length === 0) return
610
+ ringlength.push(item.length)
611
+ return item.map(k => {
612
+ return k.id
613
+ })
614
+ })
615
+ let newRings = ringsequence.filter(item => item)
616
+ let minLength = Math.min(...ringlength)
617
+ let resultArrs = [] // 环1分组
618
+ let resultArr = [] // 环2分组
619
+ for (let j = 0; j < ringsequence[0].length; j += minLength) {
620
+ resultArrs.push(ringsequence[0].slice(j, j + minLength))
621
+ if (ringsequence[0].length === minLength) {
622
+ resultArrs.push([])
623
+ }
624
+ }
625
+ if (newRings.length > 1) {
626
+ for (let i = 0; i < ringsequence[1].length; i += minLength) {
627
+ resultArr.push(ringsequence[1].slice(i, i + minLength))
628
+ }
629
+ }
630
+ // this.patternInfo = []
631
+ // this.barrierList = []
632
+ let currentArr = []
633
+ let newPattern = []
634
+ val.map(i => {
635
+ newPattern.push(...i)
636
+ })
637
+ if (this.phaseList.length === 0) return
638
+ for (let patternStatus of val[0]) {
639
+ // if (patternStatus.mode !== 7) {
640
+ let concurrent = this.phaseList.filter((item) => {
641
+ return item.id === patternStatus.id // patternStatus.id当前相位id concurrent当前相位的并发相位
642
+ })[0].concurrent// 当前相位的并发相位
643
+ if (concurrent) {
644
+ let obj = {
645
+ id: patternStatus.id,
646
+ current: concurrent.sort()
647
+ }
648
+ currentArr.push(obj)
649
+ }
650
+ // }
651
+ }
652
+ if (currentArr.length !== 0) {
653
+ let newCurrent = this.tranform(currentArr)
654
+ // 取没个环与环关系的并集
655
+ let barrierRing1 = []
656
+ let barrierRing2 = []
657
+ let ring1 = [] // 环1与关系1的并集
658
+ for (let h = 0; h < newCurrent.length; h++) {
659
+ let adds = [...new Set(resultArrs[0])].filter(item => newCurrent[h].includes(item))
660
+ ring1.push(adds)
661
+ }
662
+ let ring1s = [] // 环1与关系2的并集
663
+ for (let h = 0; h < newCurrent.length; h++) {
664
+ let addRing1 = [...new Set(resultArrs[1])].filter(item => newCurrent[h].includes(item))
665
+ ring1s.push(addRing1)
666
+ }
667
+ barrierRing1.push(...ring1, ...ring1s)
668
+ let resultList = []
669
+ if (newRings.length > 1) {
670
+ let ring2s = [] // 环2与关系1的并集
671
+ for (let h = 0; h < newCurrent.length; h++) {
672
+ let addRing2 = [...new Set(resultArr[1])].filter(item => newCurrent[h].includes(item))
673
+ ring2s.push(addRing2)
674
+ }
675
+ let ring2 = [] // 环2与关系1的并集
676
+ for (let h = 0; h < newCurrent.length; h++) {
677
+ let add = [...new Set(resultArr[0])].filter(item => newCurrent[h].includes(item))
678
+ ring2.push(add)
679
+ }
680
+ barrierRing2.push(...ring2, ...ring2s)
681
+ for (let k = 0; k < barrierRing1.length; k++) {
682
+ resultList.push(barrierRing1[k].concat(barrierRing2[k]))
683
+ }
684
+ }
685
+ let resultLists = resultList.filter(item => item.length !== 0)
686
+ let ringArr = []
687
+ for (let l = 0; l < resultLists.length; l++) {
688
+ for (let d = 0; d < newCurrent.length; d++) {
689
+ if (newCurrent[d].filter(item => resultLists[l].includes(item)).length > 0) {
690
+ ringArr.push({
691
+ data: resultLists[l],
692
+ id: d + 1,
693
+ index: l
694
+ })
695
+ }
696
+ }
697
+ }
698
+ for (var i = 0; i < ringArr.length; i++) {
699
+ for (var j = i + 1; j < ringArr.length; j++) {
700
+ if (ringArr[i].id === ringArr[j].id && ringArr[i].index + 1 === ringArr[j].index) {
701
+ ringArr[i].data = ringArr[i].data.concat(ringArr[j].data)
702
+ ringArr.splice(ringArr.indexOf(ringArr[j].id), 1)
703
+ }
704
+ }
705
+ }
706
+ let resArr = ringArr.map(item => item.data)
707
+ let ringTeam = this.step1(this.phaseList, resArr)
708
+ let ringTeams = ringTeam.filter(item => item.length !== 0)
709
+ return this.setBarrier(ringTeams, val)
710
+ }
711
+ },
712
+ setBarrier (ringTeam, val) {
713
+ const patternObjs = {}
714
+ val.forEach(l => {
715
+ l.map(k => {
716
+ patternObjs[k.id] = k.value
717
+ })
718
+ })
719
+ let ret = ringTeam.map((y, index) => {
720
+ if (!y || y.length === 0) return
721
+ y.map(n => {
722
+ n.length = n.data.length > 1 ? n.data.reduce((pre, cur) => pre + patternObjs[cur], 0) : patternObjs[n.data[0]]
723
+ })
724
+ return {
725
+ barrier: index + 1,
726
+ length: y[0].length,
727
+ items: y.map(j => {
728
+ return {
729
+ ring: j.ring,
730
+ data: j.data
731
+ }
732
+ })
733
+ }
734
+ })
735
+ return ret
736
+ },
737
+ step1 (list, arr) { // 各个环包含的相位
738
+ const ret = []
739
+ const listObj = {}
740
+ list.forEach(l => {
741
+ listObj[l.id] = l.ring
742
+ })
743
+ arr.forEach(a => {
744
+ const retItem = []
745
+ a.forEach(b => {
746
+ if (listObj[b]) {
747
+ const find = retItem.find(r => r.ring === listObj[b])
748
+ if (find) find.data.push(b)
749
+ else retItem.push({ ring: listObj[b], data: [b] })
750
+ }
751
+ })
752
+ ret.push(retItem)
753
+ })
754
+ return ret
755
+ },
756
+ getStageItem (stageArr, stage, ringsList, i) {
757
+ let res = {
758
+ key: i,
759
+ split: this.narr[i], // 阶段绿性比
760
+ phases: stageArr,
761
+ stageKanban: stage,
762
+ delaystart: 0,
763
+ advanceend: 0
764
+ }
765
+ // let splitArr = []
766
+ let delaystartArr = []
767
+ let advanceendArr = []
768
+ for (let rings of ringsList) {
769
+ for (let ring of rings) {
770
+ if (stageArr.includes(ring.id)) {
771
+ // let split = ring.value
772
+ let delaystart = ring.delaystart
773
+ let advanceend = ring.advanceend
774
+ // splitArr.push(split)
775
+ delaystartArr.push(delaystart)
776
+ advanceendArr.push(advanceend)
777
+ }
778
+ }
779
+ }
780
+ // splitArr.sort(function (a, b) { return a - b })
781
+ delaystartArr.sort(function (a, b) { return b - a })
782
+ advanceendArr.sort(function (a, b) { return a - b })
783
+ // res.split = splitArr.length > 0 ? splitArr[0] : 0
784
+ res.delaystart = delaystartArr.length > 0 ? delaystartArr[0] : 0
785
+ res.advanceend = advanceendArr.length > 0 ? advanceendArr[0] : 0
786
+ return res
787
+ },
788
+ changeStage (value) {
789
+ if (value) {
790
+ this.manualsStage = {}
791
+ this.manuals = true
792
+ let stages = []
793
+ let secletIds = isNaN(parseInt(value)) ? Number(value.replace(/[^0-9]/ig, '')) : value
794
+ stages = this.patternAll.filter(item => {
795
+ return item.id === secletIds
796
+ })[0].stages
797
+ this.manualsStage.stages = stages
798
+ } else {
799
+ this.manuals = false
800
+ this.realtimeStage = JSON.parse(JSON.stringify(this.crossStatusData))
801
+ }
802
+ },
803
+ handleClose () {
804
+ this.$emit('closeManualModal')
805
+ },
806
+ handleManualControl () {
807
+ this.$emit('patternCommit', this.manualInfo)
808
+ },
809
+ selectModel (item) {
810
+ this.preselecttype = item.type
811
+ this.manualInfo.fromControl = item.id
812
+ if (item.iconClass === 'jieduansuoding') {
813
+ this.manualInfo.fromControl = 40
814
+ }
815
+ this.$emit('selectModel', item.id)
816
+ },
817
+ selectStages (value) {
818
+ this.$emit('selectStages', value)
819
+ },
820
+ selectSpecialModel () {
821
+ this.$emit('selectSpecialModel')
822
+ },
823
+ init (tab) {
824
+ this.$refs.ControlModelGroup.init()
825
+ if (!tab) return
826
+ if (this.controlData.patternid) {
827
+ this.manualInfo.tempPatternid = this.controlData.patternid
828
+ }
829
+ if (this.controlData.tempDuration) {
830
+ this.manualInfo.tempDuration = this.controlData.duration
831
+ }
832
+ if (tab.name === 'schemeselection') {
833
+ this.initPattern()
834
+ this.selectPattern()
835
+ }
836
+ },
837
+ closePhaseBack () {
838
+ this.$emit('closePhaseBack')
839
+ },
840
+ closePhaseControl (controldata) {
841
+ this.$emit('closePhaseControl', controldata)
842
+ },
843
+ initPattern () {
844
+ this.patternPlan()
845
+ this.getCycle()
846
+ if (this.patternOne.length === 0) {
847
+ this.handleStageData(this.planPattern.rings)
848
+ }
849
+ },
850
+ toAutoControl () {
851
+ let autonomyControl = {
852
+ id: 0,
853
+ iconClass: 'zizhukongzhi',
854
+ permission: 'configer:manual:renew',
855
+ iconName: '自主控制'
856
+ }
857
+ this.$emit('selectModel', autonomyControl.id)
858
+ this.handleManualControl()
859
+ }
860
+ },
861
+ mounted () {
862
+ }
863
+ }
864
+ </script>