openatc-components 0.2.34 → 0.2.35

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 (484) hide show
  1. package/.babelrc +18 -18
  2. package/.editorconfig +9 -9
  3. package/.eslintignore +5 -5
  4. package/.eslintrc.js +29 -29
  5. package/.postcssrc.js +10 -10
  6. package/README.md +30 -30
  7. package/build/build.js +41 -41
  8. package/build/check-versions.js +54 -54
  9. package/build/package.config.js +58 -58
  10. package/build/package.dev.config.js +107 -107
  11. package/build/package.prod.config.js +160 -160
  12. package/build/utils.js +101 -101
  13. package/build/vue-loader.conf.js +22 -22
  14. package/build/webpack.base.conf.js +114 -114
  15. package/build/webpack.dev.conf.js +95 -95
  16. package/build/webpack.prod.conf.js +149 -149
  17. package/config/dev.env.js +8 -8
  18. package/config/index.js +93 -93
  19. package/config/prod.env.js +5 -5
  20. package/config/test.env.js +7 -7
  21. package/index.html +12 -12
  22. package/package/kisscomps/components/BoardCard/BoardCard.vue +112 -112
  23. package/package/kisscomps/components/BoardCard/index.js +2 -2
  24. package/package/kisscomps/components/Channelization/Channelization.vue +584 -584
  25. package/package/kisscomps/components/Channelization/index.js +2 -2
  26. package/package/kisscomps/components/ChannelizationFlowStatistic/ChannelizationFlowStatistic.vue +360 -360
  27. package/package/kisscomps/components/ChannelizationFlowStatistic/index.js +2 -2
  28. package/package/kisscomps/components/ChannelizationWithInterface/ChannelizationWithInterface.vue +518 -518
  29. package/package/kisscomps/components/ChannelizationWithInterface/index.js +2 -2
  30. package/package/kisscomps/components/CommonKanban/CommonKanban.vue +132 -132
  31. package/package/kisscomps/components/CommonKanban/index.js +2 -2
  32. package/package/kisscomps/components/DirectionListConfiguration/DirectionListConfiguration.vue +454 -454
  33. package/package/kisscomps/components/DirectionListConfiguration/index.js +2 -2
  34. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-east-bottom.vue +41 -41
  35. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-east-top.vue +60 -60
  36. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-ewped.vue +105 -105
  37. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-north-left.vue +60 -60
  38. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-north-right.vue +60 -60
  39. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-snped.vue +105 -105
  40. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-south-left.vue +60 -60
  41. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-south-right.vue +60 -60
  42. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-west-bottom.vue +60 -60
  43. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-west-top.vue +60 -60
  44. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-xlped.vue +30 -30
  45. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-xrped.vue +30 -30
  46. package/package/kisscomps/components/DirectionListConfiguration/svg/pedSvg.vue +78 -78
  47. package/package/kisscomps/components/DrawChannelization/drawsvg/basicCoordInfo.vue +181 -181
  48. package/package/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +255 -255
  49. package/package/kisscomps/components/DrawChannelization/drawsvg/detectorAssociatedComponent.vue +152 -152
  50. package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/TextBox.vue +91 -91
  51. package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +194 -194
  52. package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/editText.vue +108 -108
  53. package/package/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +51 -51
  54. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +236 -236
  55. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +247 -247
  56. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +210 -210
  57. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +72 -72
  58. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +467 -467
  59. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +230 -230
  60. package/package/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +74 -74
  61. package/package/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +1005 -1005
  62. package/package/kisscomps/components/DrawChannelization/drawsvg/index.vue +110 -110
  63. package/package/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +707 -707
  64. package/package/kisscomps/components/DrawChannelization/drawsvg/overlapAssociatedComponent.vue +172 -172
  65. package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.vue +172 -172
  66. package/package/kisscomps/components/DrawChannelization/drawsvg/table.vue +99 -99
  67. package/package/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +87 -87
  68. package/package/kisscomps/components/DrawChannelization/drawsvg/utils/phaseDataModel.js +32 -32
  69. package/package/kisscomps/components/DrawChannelization/drawsvg/utils/phasePos.json +20 -20
  70. package/package/kisscomps/components/DrawChannelization/index.js +2 -2
  71. package/package/kisscomps/components/DrawChannelization/phaseDataMgr.js +278 -278
  72. package/package/kisscomps/components/ExpendConfig/ExpendConfig.vue +118 -118
  73. package/package/kisscomps/components/ExpendConfig/index.js +2 -2
  74. package/package/kisscomps/components/FaultDetailModal/FaultDetailModal.vue +178 -178
  75. package/package/kisscomps/components/FaultDetailModal/index.js +2 -2
  76. package/package/kisscomps/components/IntersectionDirectionSelection/IntersectionDirectionSelection.vue +127 -158
  77. package/package/kisscomps/components/IntersectionDirectionSelection/index.js +2 -2
  78. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/CrossRoadsSvg.vue +496 -496
  79. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/CustomRoadsSvg.vue +46 -46
  80. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionEWSvg.vue +300 -300
  81. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionSNSvg.vue +288 -288
  82. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampEastSvg.vue +391 -391
  83. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampNorthSvg.vue +336 -336
  84. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampSouthSvg.vue +345 -345
  85. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampWestSvg.vue +389 -389
  86. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkClickSvg.vue +1272 -1272
  87. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkSvg.vue +1190 -1190
  88. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeEastRoadsSvg.vue +402 -402
  89. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeNorthRoadsSvg.vue +361 -361
  90. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeSouthRoadsSvg.vue +368 -368
  91. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeWestRoadsSvg.vue +475 -475
  92. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LCrossRoadsSvg.vue +494 -494
  93. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeEastRoadsSvg.vue +401 -401
  94. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeNorthRoadsSvg.vue +360 -360
  95. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeSouthRoadsSvg.vue +367 -367
  96. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeWestRoadsSvg.vue +476 -476
  97. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/refreshSvg.vue +63 -63
  98. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/busMapSvg.vue +50 -50
  99. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/eastBusSvg.vue +167 -167
  100. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/northBusSvg.vue +168 -168
  101. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/southBusSvg.vue +168 -168
  102. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/westBusSvg.vue +169 -169
  103. package/package/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +1200 -1200
  104. package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/LphaseIconSvg.vue +197 -197
  105. package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/phaseIconSvg.vue +196 -196
  106. package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/rampPhaseIconSvg.vue +122 -122
  107. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.json +196 -196
  108. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.left.json +196 -196
  109. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.json +115 -115
  110. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.left.json +115 -115
  111. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/rampPos.json +52 -52
  112. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/sidePos.json +219 -219
  113. package/package/kisscomps/components/IntersectionMap/crossDirection/utils.js +84 -84
  114. package/package/kisscomps/components/IntersectionMap/index.js +2 -2
  115. package/package/kisscomps/components/IntersectionMap/intersectionmap.vue +199 -199
  116. package/package/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +530 -530
  117. package/package/kisscomps/components/IntersectionWithInterface/index.js +2 -2
  118. package/package/kisscomps/components/KanBan/index.js +2 -2
  119. package/package/kisscomps/components/KanBan/kanban.vue +225 -225
  120. package/package/kisscomps/components/MessageBox/index.vue +96 -96
  121. package/package/kisscomps/components/OverLap/OverLap.vue +235 -235
  122. package/package/kisscomps/components/OverLap/index.js +2 -2
  123. package/package/kisscomps/components/PatternOptimize/PatternOptimize.vue +272 -272
  124. package/package/kisscomps/components/PatternOptimize/index.js +2 -2
  125. package/package/kisscomps/components/PatternStatus/PatternStatus.vue +1481 -1478
  126. package/package/kisscomps/components/PatternStatus/index.js +2 -2
  127. package/package/kisscomps/components/PatternWalkSvg/PatternWalkSvg.vue +423 -423
  128. package/package/kisscomps/components/PatternWalkSvg/index.js +2 -2
  129. package/package/kisscomps/components/PhaseDirectionSelect/PhaseDirectionSelect.vue +126 -126
  130. package/package/kisscomps/components/PhaseDirectionSelect/index.js +2 -2
  131. package/package/kisscomps/components/PhaseDirectionText/PhaseDirectionText.vue +106 -106
  132. package/package/kisscomps/components/PhaseDirectionText/index.js +2 -2
  133. package/package/kisscomps/components/PhaseMarker/index.js +6 -6
  134. package/package/kisscomps/components/PhaseMarker/phasemarker.vue +215 -215
  135. package/package/kisscomps/components/PhaseMarker/svg/patternSvg.vue +121 -121
  136. package/package/kisscomps/components/PhaseMarker/svg/phase.vue +60 -60
  137. package/package/kisscomps/components/PhaseMarker/svg/phaseCount.vue +62 -62
  138. package/package/kisscomps/components/PhaseMarker/svg/phaseCountCycle.vue +62 -62
  139. package/package/kisscomps/components/PhaseMarker/svg/phaseSvg.vue +117 -117
  140. package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +988 -835
  141. package/package/kisscomps/components/SchemeConfig/azimuthlocking/index.vue +356 -313
  142. package/package/kisscomps/components/SchemeConfig/azimuthlocking/utils.js +92 -92
  143. package/package/kisscomps/components/SchemeConfig/closePhaselControlModal/index.vue +206 -195
  144. package/package/kisscomps/components/SchemeConfig/index.js +2 -2
  145. package/package/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +208 -198
  146. package/package/kisscomps/components/SchemeConfig/manualControlModal/index.vue +235 -235
  147. package/package/kisscomps/components/SchemeConfig/manualControlModalNew/controlModelGroup.vue +128 -0
  148. package/package/kisscomps/components/SchemeConfig/manualControlModalNew/icon.vue +426 -0
  149. package/package/kisscomps/components/SchemeConfig/manualControlModalNew/index.vue +820 -0
  150. package/package/kisscomps/components/SchemeConfig/manualControlModalNew/othersIcon.vue +194 -0
  151. package/package/kisscomps/components/SchemeConfig/priorityControl/index.vue +206 -197
  152. package/package/kisscomps/components/SchemeConfig/priorityControl/utils.js +163 -163
  153. package/package/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +275 -275
  154. package/package/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +1196 -1194
  155. package/package/kisscomps/components/SelectCrossPhase/index.vue +417 -417
  156. package/package/kisscomps/components/SelectCrossPhase/utils.js +142 -142
  157. package/package/kisscomps/components/StageBord/StageBord.vue +287 -287
  158. package/package/kisscomps/components/StageBord/index.js +2 -2
  159. package/package/kisscomps/components/StageStatus/StageStatus.vue +341 -341
  160. package/package/kisscomps/components/StageStatus/index.js +2 -2
  161. package/package/kisscomps/components/Stages/index.vue +252 -211
  162. package/package/kisscomps/components/SvgIcon/SvgIcon.vue +53 -53
  163. package/package/kisscomps/components/SvgIcon/index.js +2 -2
  164. package/package/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +1067 -1065
  165. package/package/kisscomps/components/XRDDirSelector/index.js +2 -2
  166. package/package/kisscomps/components/XiaoKanban/DirSelector.vue +356 -356
  167. package/package/kisscomps/components/XiaoKanban/index.vue +102 -102
  168. package/package/kisscomps/components/overView/index.vue +699 -699
  169. package/package/kisscomps/components/patternConfig/index.js +2 -2
  170. package/package/kisscomps/components/patternConfig/index.vue +1126 -1126
  171. package/package/kisscomps/components/patternConfig/pattern/patternTable.vue +348 -408
  172. package/package/kisscomps/components/patternConfig/pattern/planChart/model/coordinationModel.js +665 -665
  173. package/package/kisscomps/components/patternConfig/planContent.vue +573 -576
  174. package/package/kisscomps/components/patternConfig/planMenu.vue +329 -329
  175. package/package/kisscomps/components/patternConfig/utils.js +152 -152
  176. package/package/kisscomps/components/patternList/index.js +2 -2
  177. package/package/kisscomps/components/patternList/patternList.vue +585 -585
  178. package/package/kisscomps/index.js +123 -123
  179. package/package/kissui.min.js +1 -1
  180. package/package.json +127 -127
  181. package/src/App.vue +24 -24
  182. package/src/EdgeMgr/EdgeModelBase.js +16 -16
  183. package/src/EdgeMgr/controller/crossDiagramMgr.js +125 -125
  184. package/src/api/authapi.js +31 -31
  185. package/src/api/config.js +21 -21
  186. package/src/api/control.js +106 -106
  187. package/src/api/cross.js +49 -49
  188. package/src/api/device.js +135 -135
  189. package/src/api/fault.js +66 -66
  190. package/src/api/index.js +24 -24
  191. package/src/api/login.js +46 -46
  192. package/src/api/optimize.js +72 -72
  193. package/src/api/param.js +165 -165
  194. package/src/api/passwdAssest.js +101 -101
  195. package/src/api/route.js +171 -171
  196. package/src/api/template.js +27 -27
  197. package/src/i18n/index.js +26 -26
  198. package/src/i18n/language/en.js +1436 -1432
  199. package/src/i18n/language/index.js +25 -25
  200. package/src/i18n/language/zh.js +1435 -1431
  201. package/src/icons/demo.css +539 -539
  202. package/src/icons/demo_index.html +8146 -8146
  203. package/src/icons/iconfont.css +1399 -1399
  204. package/src/icons/iconfont.json +2431 -2431
  205. package/src/icons/index.js +20 -20
  206. package/src/icons/svg/azimuthlocking.svg +26 -26
  207. package/src/icons/svg/bendi.svg +110 -110
  208. package/src/icons/svg/bujin.svg +36 -36
  209. package/src/icons/svg/connectBlue.svg +7 -7
  210. package/src/icons/svg/currentvolume.svg +0 -0
  211. package/src/icons/svg/custom-BRTlane.svg +40 -40
  212. package/src/icons/svg/custom-buslane.svg +40 -40
  213. package/src/icons/svg/custom-detector.svg +12 -12
  214. package/src/icons/svg/custom-east-bottom.svg +32 -32
  215. package/src/icons/svg/custom-east-top.svg +32 -32
  216. package/src/icons/svg/custom-ewped.svg +35 -35
  217. package/src/icons/svg/custom-nonmotorizedlane.svg +40 -40
  218. package/src/icons/svg/custom-north-left.svg +32 -32
  219. package/src/icons/svg/custom-north-right.svg +32 -32
  220. package/src/icons/svg/custom-peddetector.svg +17 -17
  221. package/src/icons/svg/custom-snped.svg +35 -35
  222. package/src/icons/svg/custom-south-left.svg +32 -32
  223. package/src/icons/svg/custom-south-right.svg +32 -32
  224. package/src/icons/svg/custom-tramlane.svg +40 -40
  225. package/src/icons/svg/custom-vehiclebranch.svg +40 -40
  226. package/src/icons/svg/custom-vehiclemainroad.svg +41 -41
  227. package/src/icons/svg/custom-west-bottom.svg +32 -32
  228. package/src/icons/svg/custom-west-top.svg +32 -32
  229. package/src/icons/svg/custom-xlped.svg +14 -14
  230. package/src/icons/svg/custom-xrped.svg +14 -14
  231. package/src/icons/svg/cutRed.svg +7 -7
  232. package/src/icons/svg/cycle.svg +0 -0
  233. package/src/icons/svg/dingzhouqi.svg +34 -34
  234. package/src/icons/svg/fangxiangsuoding.svg +1 -0
  235. package/src/icons/svg/ganyingkongzhi.svg +30 -30
  236. package/src/icons/svg/guandeng.svg +81 -81
  237. package/src/icons/svg/huangshan.svg +71 -71
  238. package/src/icons/svg/jieduansuoding.svg +1 -0
  239. package/src/icons/svg/maincontrol.svg +0 -0
  240. package/src/icons/svg/manualcontrolbackground.svg +51 -51
  241. package/src/icons/svg/manualcontrolbackground1.svg +62 -62
  242. package/src/icons/svg/manualcontrolbackgrounden.svg +62 -62
  243. package/src/icons/svg/model.svg +0 -0
  244. package/src/icons/svg/phasediff.svg +0 -0
  245. package/src/icons/svg/prioritycontrol.svg +21 -21
  246. package/src/icons/svg/quanhong.svg +86 -86
  247. package/src/icons/svg/shanghe.svg +11 -11
  248. package/src/icons/svg/shoudong.svg +103 -103
  249. package/src/icons/svg/tentativeplan.svg +28 -28
  250. package/src/icons/svg/time.svg +0 -0
  251. package/src/icons/svg/wuxianlan.svg +46 -46
  252. package/src/icons/svg/xiala.svg +11 -11
  253. package/src/icons/svg/xiangweisuoding.svg +1 -0
  254. package/src/icons/svg/xingrenguojie.svg +33 -33
  255. package/src/icons/svg/xitong.svg +89 -89
  256. package/src/icons/svg/youxian.svg +41 -41
  257. package/src/icons/svg/zizhukongzhi.svg +43 -43
  258. package/src/kisscomps/components/BoardCard/BoardCard.vue +112 -112
  259. package/src/kisscomps/components/BoardCard/index.js +2 -2
  260. package/src/kisscomps/components/Channelization/Channelization.vue +584 -584
  261. package/src/kisscomps/components/Channelization/index.js +2 -2
  262. package/src/kisscomps/components/ChannelizationFlowStatistic/ChannelizationFlowStatistic.vue +360 -360
  263. package/src/kisscomps/components/ChannelizationFlowStatistic/index.js +2 -2
  264. package/src/kisscomps/components/ChannelizationWithInterface/ChannelizationWithInterface.vue +518 -518
  265. package/src/kisscomps/components/ChannelizationWithInterface/index.js +2 -2
  266. package/src/kisscomps/components/CommonKanban/CommonKanban.vue +132 -132
  267. package/src/kisscomps/components/CommonKanban/index.js +2 -2
  268. package/src/kisscomps/components/DirectionListConfiguration/DirectionListConfiguration.vue +454 -454
  269. package/src/kisscomps/components/DirectionListConfiguration/index.js +2 -2
  270. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-east-bottom.vue +41 -41
  271. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-east-top.vue +60 -60
  272. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-ewped.vue +105 -105
  273. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-north-left.vue +60 -60
  274. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-north-right.vue +60 -60
  275. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-snped.vue +105 -105
  276. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-south-left.vue +60 -60
  277. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-south-right.vue +60 -60
  278. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-west-bottom.vue +60 -60
  279. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-west-top.vue +60 -60
  280. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-xlped.vue +30 -30
  281. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-xrped.vue +30 -30
  282. package/src/kisscomps/components/DirectionListConfiguration/svg/pedSvg.vue +78 -78
  283. package/src/kisscomps/components/DrawChannelization/drawsvg/basicCoordInfo.vue +181 -181
  284. package/src/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +255 -255
  285. package/src/kisscomps/components/DrawChannelization/drawsvg/detectorAssociatedComponent.vue +152 -152
  286. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/TextBox.vue +91 -91
  287. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +194 -194
  288. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/editText.vue +108 -108
  289. package/src/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +51 -51
  290. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +236 -236
  291. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +247 -247
  292. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +210 -210
  293. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +72 -72
  294. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +467 -467
  295. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +230 -230
  296. package/src/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +74 -74
  297. package/src/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +1005 -1005
  298. package/src/kisscomps/components/DrawChannelization/drawsvg/index.vue +110 -110
  299. package/src/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +707 -707
  300. package/src/kisscomps/components/DrawChannelization/drawsvg/overlapAssociatedComponent.vue +172 -172
  301. package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.vue +172 -172
  302. package/src/kisscomps/components/DrawChannelization/drawsvg/table.vue +99 -99
  303. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +87 -87
  304. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/phaseDataModel.js +32 -32
  305. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/phasePos.json +20 -20
  306. package/src/kisscomps/components/DrawChannelization/index.js +2 -2
  307. package/src/kisscomps/components/DrawChannelization/phaseDataMgr.js +278 -278
  308. package/src/kisscomps/components/ExpendConfig/ExpendConfig.vue +118 -118
  309. package/src/kisscomps/components/ExpendConfig/index.js +2 -2
  310. package/src/kisscomps/components/FaultDetailModal/FaultDetailModal.vue +178 -178
  311. package/src/kisscomps/components/FaultDetailModal/index.js +2 -2
  312. package/src/kisscomps/components/IntersectionDirectionSelection/IntersectionDirectionSelection.vue +127 -158
  313. package/src/kisscomps/components/IntersectionDirectionSelection/index.js +2 -2
  314. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/CrossRoadsSvg.vue +496 -496
  315. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/CustomRoadsSvg.vue +46 -46
  316. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionEWSvg.vue +300 -300
  317. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionSNSvg.vue +288 -288
  318. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampEastSvg.vue +391 -391
  319. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampNorthSvg.vue +336 -336
  320. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampSouthSvg.vue +345 -345
  321. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampWestSvg.vue +389 -389
  322. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkClickSvg.vue +1272 -1272
  323. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkSvg.vue +1190 -1190
  324. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeEastRoadsSvg.vue +402 -402
  325. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeNorthRoadsSvg.vue +361 -361
  326. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeSouthRoadsSvg.vue +368 -368
  327. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeWestRoadsSvg.vue +475 -475
  328. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LCrossRoadsSvg.vue +494 -494
  329. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeEastRoadsSvg.vue +401 -401
  330. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeNorthRoadsSvg.vue +360 -360
  331. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeSouthRoadsSvg.vue +367 -367
  332. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeWestRoadsSvg.vue +476 -476
  333. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/refreshSvg.vue +63 -63
  334. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/busMapSvg.vue +50 -50
  335. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/eastBusSvg.vue +167 -167
  336. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/northBusSvg.vue +168 -168
  337. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/southBusSvg.vue +168 -168
  338. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/westBusSvg.vue +169 -169
  339. package/src/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +1200 -1200
  340. package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/LphaseIconSvg.vue +197 -197
  341. package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/phaseIconSvg.vue +196 -196
  342. package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/rampPhaseIconSvg.vue +122 -122
  343. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.json +196 -196
  344. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.left.json +196 -196
  345. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.json +115 -115
  346. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.left.json +115 -115
  347. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/rampPos.json +52 -52
  348. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/sidePos.json +219 -219
  349. package/src/kisscomps/components/IntersectionMap/crossDirection/utils.js +84 -84
  350. package/src/kisscomps/components/IntersectionMap/index.js +2 -2
  351. package/src/kisscomps/components/IntersectionMap/intersectionmap.vue +199 -199
  352. package/src/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +530 -530
  353. package/src/kisscomps/components/IntersectionWithInterface/index.js +2 -2
  354. package/src/kisscomps/components/KanBan/index.js +2 -2
  355. package/src/kisscomps/components/KanBan/kanban.vue +225 -225
  356. package/src/kisscomps/components/MessageBox/index.vue +96 -96
  357. package/src/kisscomps/components/OverLap/OverLap.vue +235 -235
  358. package/src/kisscomps/components/OverLap/index.js +2 -2
  359. package/src/kisscomps/components/PatternOptimize/PatternOptimize.vue +272 -272
  360. package/src/kisscomps/components/PatternOptimize/index.js +2 -2
  361. package/src/kisscomps/components/PatternStatus/PatternStatus.vue +1481 -1478
  362. package/src/kisscomps/components/PatternStatus/index.js +2 -2
  363. package/src/kisscomps/components/PatternWalkSvg/PatternWalkSvg.vue +423 -423
  364. package/src/kisscomps/components/PatternWalkSvg/index.js +2 -2
  365. package/src/kisscomps/components/PhaseDirectionSelect/PhaseDirectionSelect.vue +126 -126
  366. package/src/kisscomps/components/PhaseDirectionSelect/index.js +2 -2
  367. package/src/kisscomps/components/PhaseDirectionText/PhaseDirectionText.vue +106 -106
  368. package/src/kisscomps/components/PhaseDirectionText/index.js +2 -2
  369. package/src/kisscomps/components/PhaseMarker/index.js +6 -6
  370. package/src/kisscomps/components/PhaseMarker/phasemarker.vue +215 -215
  371. package/src/kisscomps/components/PhaseMarker/svg/patternSvg.vue +121 -121
  372. package/src/kisscomps/components/PhaseMarker/svg/phase.vue +60 -60
  373. package/src/kisscomps/components/PhaseMarker/svg/phaseCount.vue +62 -62
  374. package/src/kisscomps/components/PhaseMarker/svg/phaseCountCycle.vue +62 -62
  375. package/src/kisscomps/components/PhaseMarker/svg/phaseSvg.vue +117 -117
  376. package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +988 -835
  377. package/src/kisscomps/components/SchemeConfig/azimuthlocking/index.vue +356 -313
  378. package/src/kisscomps/components/SchemeConfig/azimuthlocking/utils.js +92 -92
  379. package/src/kisscomps/components/SchemeConfig/closePhaselControlModal/index.vue +206 -195
  380. package/src/kisscomps/components/SchemeConfig/index.js +2 -2
  381. package/src/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +208 -198
  382. package/src/kisscomps/components/SchemeConfig/manualControlModal/index.vue +235 -235
  383. package/src/kisscomps/components/SchemeConfig/manualControlModalNew/controlModelGroup.vue +128 -0
  384. package/src/kisscomps/components/SchemeConfig/manualControlModalNew/icon.vue +426 -0
  385. package/src/kisscomps/components/SchemeConfig/manualControlModalNew/index.vue +820 -0
  386. package/src/kisscomps/components/SchemeConfig/manualControlModalNew/othersIcon.vue +194 -0
  387. package/src/kisscomps/components/SchemeConfig/priorityControl/index.vue +206 -197
  388. package/src/kisscomps/components/SchemeConfig/priorityControl/utils.js +163 -163
  389. package/src/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +275 -275
  390. package/src/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +1196 -1194
  391. package/src/kisscomps/components/SelectCrossPhase/index.vue +417 -417
  392. package/src/kisscomps/components/SelectCrossPhase/utils.js +142 -142
  393. package/src/kisscomps/components/StageBord/StageBord.vue +287 -287
  394. package/src/kisscomps/components/StageBord/index.js +2 -2
  395. package/src/kisscomps/components/StageStatus/StageStatus.vue +341 -341
  396. package/src/kisscomps/components/StageStatus/index.js +2 -2
  397. package/src/kisscomps/components/Stages/index.vue +252 -211
  398. package/src/kisscomps/components/SvgIcon/SvgIcon.vue +53 -53
  399. package/src/kisscomps/components/SvgIcon/index.js +2 -2
  400. package/src/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +1067 -1065
  401. package/src/kisscomps/components/XRDDirSelector/index.js +2 -2
  402. package/src/kisscomps/components/XiaoKanban/DirSelector.vue +356 -356
  403. package/src/kisscomps/components/XiaoKanban/index.vue +102 -102
  404. package/src/kisscomps/components/overView/index.vue +699 -699
  405. package/src/kisscomps/components/patternConfig/index.js +2 -2
  406. package/src/kisscomps/components/patternConfig/index.vue +1126 -1126
  407. package/src/kisscomps/components/patternConfig/pattern/patternTable.vue +348 -408
  408. package/src/kisscomps/components/patternConfig/pattern/planChart/model/coordinationModel.js +665 -665
  409. package/src/kisscomps/components/patternConfig/planContent.vue +573 -576
  410. package/src/kisscomps/components/patternConfig/planMenu.vue +329 -329
  411. package/src/kisscomps/components/patternConfig/utils.js +152 -152
  412. package/src/kisscomps/components/patternList/index.js +2 -2
  413. package/src/kisscomps/components/patternList/patternList.vue +585 -585
  414. package/src/kisscomps/index.js +123 -123
  415. package/src/lib/publicjs/ArryListUtil.js +38 -38
  416. package/src/lib/publicjs/HttpurlMgr.js +45 -45
  417. package/src/lib/publicjs/KissApi.js +158 -158
  418. package/src/lib/publicjs/KissWSSub/Heartcheck.js +128 -128
  419. package/src/lib/publicjs/KissWSSub/KissWsSub.js +91 -91
  420. package/src/lib/publicjs/KissWSSub/KissWsSubByType.js +152 -152
  421. package/src/lib/publicjs/KissWSSub/SimuWsSubByType.js +44 -44
  422. package/src/lib/publicjs/KissWSSub/Sub.js +51 -51
  423. package/src/lib/publicjs/KissWSSub/SubChannel.js +119 -119
  424. package/src/lib/publicjs/basecomponents.js +65 -65
  425. package/src/lib/publicjs/localStorage.js +112 -112
  426. package/src/lib/publicjs/objdeepcopy.js +32 -32
  427. package/src/lib/publicjs/pageScroll.js +30 -30
  428. package/src/lib/publicjs/passwdAssest.js +101 -101
  429. package/src/lib/publicjs/styleclassfactory.js +32 -32
  430. package/src/main.js +50 -50
  431. package/src/node_modules/.package_versions.json +1 -0
  432. package/src/router/index.js +63 -63
  433. package/src/store/getters.js +16 -16
  434. package/src/store/index.js +26 -26
  435. package/src/store/modules/globalParam.js +67 -67
  436. package/src/utils/ControlFormat.js +68 -68
  437. package/src/utils/RingDataModel.js +251 -251
  438. package/src/utils/auth.js +199 -199
  439. package/src/utils/conflct.js +250 -250
  440. package/src/utils/conflictList.js +87 -87
  441. package/src/utils/dateFormat.js +41 -41
  442. package/src/utils/errorcode.js +228 -228
  443. package/src/utils/fault.js +196 -196
  444. package/src/utils/faultcode.js +209 -209
  445. package/src/utils/index.js +69 -69
  446. package/src/utils/pedphasedesc.js +119 -119
  447. package/src/utils/phaseList.js +203 -203
  448. package/src/utils/phasedesc.js +144 -144
  449. package/src/utils/responseMessage.js +21 -21
  450. package/src/utils/validate.js +43 -43
  451. package/src/views/customchannelization.vue +49 -49
  452. package/src/views/home.1.vue +479 -479
  453. package/src/views/home.vue +93 -93
  454. package/src/views/intersection.vue +359 -365
  455. package/src/views/intersection2.vue +328 -328
  456. package/src/views/overView.vue +41 -41
  457. package/src/views/patternConfig.vue +1572 -609
  458. package/src/views/schemeconfig.vue +173 -204
  459. package/static/apiconfig.json +451 -451
  460. package/static/styles/channelizatioon.scss +433 -433
  461. package/static/styles/common.scss +23 -23
  462. package/static/styles/commonkanban.scss +100 -100
  463. package/static/styles/dark/index.scss +2 -2
  464. package/static/styles/dark/theme/element-dark.scss +42 -42
  465. package/static/styles/index.scss +84 -84
  466. package/static/styles/intersection.scss +190 -190
  467. package/static/styles/light/index.scss +2 -2
  468. package/static/styles/light/theme/element-light.scss +42 -42
  469. package/static/styles/overview.scss +146 -146
  470. package/static/styles/patternConfig.scss +56 -56
  471. package/static/styles/schemeconfig.scss +513 -501
  472. package/static/styles/stages.scss +57 -64
  473. package/static/styles/uiComponents.scss +57 -57
  474. package/static/styles/xiaokanban.scss +50 -50
  475. package/static/token.json +2 -2
  476. package/test/e2e/custom-assertions/elementCount.js +27 -27
  477. package/test/e2e/nightwatch.conf.js +46 -46
  478. package/test/e2e/runner.js +48 -48
  479. package/test/e2e/specs/test.js +19 -19
  480. package/test/unit/.eslintrc +7 -7
  481. package/test/unit/jest.conf.js +30 -30
  482. package/test/unit/setup.js +3 -3
  483. package/test/unit/specs/HelloWorld.spec.js +11 -11
  484. package/package/kissui.js +0 -216608
@@ -1,835 +1,988 @@
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="scheme-config openatc-scheme-config" style="height: 100%;">
14
- <fault-detail-modal ref="faultDetail" :agentId="agentId" :isFromAtc="isFromAtc" @refreshFault="getFaultById"></fault-detail-modal>
15
- <div style="height: 100%;">
16
- <transition name="fade-right" mode="out-in"
17
- :enter-active-class="toPage === 1 ? 'animated fadeInRight' : 'animated fadeInLeft'"
18
- :leave-active-class="toPage === 1 ? 'animated fadeOutRight' : 'animated fadeOutLeft' ">
19
- <div style="position: absolute;width: 100%;height:100%;" v-show="(isOperation && !isClosePhase)">
20
- <ManualControlModal
21
- :controlData="controlData"
22
- :modelList="modelList"
23
- :patternSelect="patternSelect"
24
- :patternAll="patternAll"
25
- :crossStatusData="crossStatusData"
26
- :phaseList="phaseList"
27
- :specialcontrolList="specialcontrolList"
28
- :currModel="currModel"
29
- :preselectModel="preselectModel"
30
- :preselectStages="preselectStages"
31
- :realtimeStatusModalvisible="realtimeStatusModalvisible"
32
- :funcSort="funcSort"
33
- :roadDirection="roadDirection"
34
- @closeManualModal="closeManualModal"
35
- @selectModel="selectModel"
36
- @selectStages="selectStages"
37
- @patternCommit="patternCommit"
38
- @selectSpecialModel="selectSpecialModel" />
39
- </div>
40
- </transition>
41
- <transition name="fade-left" mode="out-in"
42
- enter-active-class="animated fadeInRight"
43
- leave-active-class="animated fadeOutRight">
44
- <div style="position: absolute;width: 100%;height:100%" v-show="(isOperation && isClosePhase)">
45
- <ClosePhaseControlModal
46
- v-if="specialPage === 'closephase'"
47
- :controlData="controlData"
48
- :closePhaseRings="phaseRings"
49
- :sidewalkPhaseData="sidewalkPhaseData"
50
- :realtimeStatusModalvisible="realtimeStatusModalvisible"
51
- :roadDirection="roadDirection"
52
- @closePhaseBack="closePhaseBack"
53
- @closePhaseControl="closePhaseControl" />
54
- <LockingPhaseControlModal
55
- v-if="specialPage === 'lockingphase'"
56
- :roadDirection="roadDirection"
57
- :phaseList="phaseList"
58
- :patternStatus="statusData"
59
- :lockPhaseBtnName="lockPhaseBtnName"
60
- @closePhaseBack="closePhaseBack"
61
- @closePhaseControl="closePhaseControl" />
62
- <TentativePlanControlModal
63
- v-if="specialPage === 'tentativeplan'"
64
- :realtimeStatusModalvisible="realtimeStatusModalvisible"
65
- :controlData="controlData"
66
- :phaseList="phaseList"
67
- :overlap="overlap"
68
- :patternSelect="patternSelect"
69
- :allPatternList="allPatternList"
70
- @closePhaseBack="closePhaseBack"
71
- @closePhaseControl="closePhaseControl"
72
- />
73
- <priorityControl
74
- v-if="specialPage === 'prioritycontrol'"
75
- :realtimeStatusModalvisible="realtimeStatusModalvisible"
76
- :phaseList="phaseList"
77
- @closePhaseBack="closePhaseBack"
78
- @closePhaseControl="closePhaseControl"
79
- />
80
- <AzimuthLocking
81
- v-if="specialPage === 'azimuthlocking'"
82
- :realtimeStatusModalvisible="realtimeStatusModalvisible"
83
- :phaseList="phaseList"
84
- :patternStatus="statusData"
85
- @closePhaseBack="closePhaseBack"
86
- @closePhaseControl="closePhaseControl"
87
- />
88
- </div>
89
- </transition>
90
-
91
- <transition name="fade-left" mode="out-in"
92
- enter-active-class="animated fadeInLeft"
93
- leave-active-class="animated fadeOutLeft">
94
- <div class="right-control-part" style="position: absolute;width: 100%;" v-show="!isOperation">
95
- <RealtimeStatusModal
96
- :controlData="controlData"
97
- :currModel="currModel"
98
- :ip="ip"
99
- :platform="platform"
100
- :responseTime="responseTime"
101
- :curFaultList="curFaultList"
102
- :confirmedFault="confirmedFault"
103
- :ignoredFault="ignoredFault"
104
- :untreatedFault="untreatedFault"
105
- :closePhase="closePhase"
106
- :agentName="agentName"
107
- :agentId="agentId"
108
- :crossStatusData="crossStatusData"
109
- :phaseList="phaseList"
110
- :sidewalkPhaseData="sidewalkPhaseData"
111
- :roadDirection="roadDirection"
112
- @changeStatus="changeStatus"
113
- @showFaultDetail="showFaultDetail"/>
114
- </div>
115
- </transition>
116
- </div>
117
- </div>
118
- </template>
119
-
120
- <script>
121
- import { putTscControl } from '../../../api/control.js'
122
- import { uploadSingleTscParam } from '../../../api/param.js'
123
- import RealtimeStatusModal from './realtimeStatusModal'
124
- import ManualControlModal from './manualControlModal'
125
- import ClosePhaseControlModal from './closePhaselControlModal'
126
- import LockingPhaseControlModal from './lockingPhaselControlModal'
127
- import TentativePlanControlModal from './tentativeplancontrolmodal'
128
- import AzimuthLocking from './azimuthlocking'
129
- import priorityControl from './priorityControl'
130
- // import { getFaultMesZh, getFaultMesEn } from '../../utils/faultcode.js'
131
- import { getMessageByCode } from '../../../utils/responseMessage'
132
- import { GetAllFaultRange } from '../../../api/fault'
133
- import PhaseDataModel from '../IntersectionMap/crossDirection/utils.js'
134
- import CrossDiagramMgr from '../../../EdgeMgr/controller/crossDiagramMgr.js'
135
- import { setToken, setHost } from '../../../utils/auth.js'
136
- import RingDataModel from '../../../utils/RingDataModel.js'
137
- import { getIntersectionInfo } from '../../../api/template'
138
- export default {
139
- name: 'scheme-config',
140
- components: {
141
- RealtimeStatusModal,
142
- ManualControlModal,
143
- ClosePhaseControlModal,
144
- LockingPhaseControlModal,
145
- priorityControl,
146
- AzimuthLocking,
147
- TentativePlanControlModal
148
- },
149
- props: {
150
- phaseList: {
151
- type: Array,
152
- default: () => []
153
- },
154
- reqUrl: {
155
- type: String,
156
- default: ''
157
- },
158
- responseTime: {
159
- type: Number,
160
- default: 0
161
- },
162
- statusData: {
163
- type: Object,
164
- required: true
165
- },
166
- agentName: {
167
- type: String,
168
- default: ''
169
- },
170
- // devStatus: {
171
- // type: Number,
172
- // default: 0
173
- // },
174
- agentId: {
175
- type: String,
176
- default: '0'
177
- },
178
- ip: {
179
- type: String
180
- },
181
- // allPatternList: {
182
- // type: Array
183
- // },
184
- // overlap: {
185
- // type: Array
186
- // },
187
- platform: {
188
- type: String
189
- },
190
- realtimeStatusModalvisible: {
191
- type: Boolean,
192
- default: true
193
- },
194
- lockPhaseBtnName: {
195
- type: String
196
- },
197
- Token: {
198
- type: String,
199
- default: ''
200
- },
201
- funcSort: {
202
- type: String,
203
- default: 'allFunc'
204
- },
205
- roadDirection: {
206
- type: String,
207
- default: 'right'
208
- },
209
- isFromAtc: {
210
- type: Boolean,
211
- default: true
212
- }
213
- },
214
- data () {
215
- return {
216
- crossStatusData: null,
217
- controlData: {},
218
- control: '',
219
- allPatternList: [],
220
- overlap: [],
221
- sidewalkPhaseData: [],
222
- list: [{
223
- iconClass: 'model',
224
- name: '控制模式',
225
- value: '--'
226
- }, {
227
- iconClass: 'cycle',
228
- name: '周期',
229
- value: '--'
230
- }, {
231
- iconClass: 'time',
232
- name: '当前时间',
233
- value: '--'
234
- }, {
235
- iconClass: 'maincontrol',
236
- name: '控制方式',
237
- value: '--'
238
- }, {
239
- iconClass: 'phasediff',
240
- name: '相位差',
241
- value: '--'
242
- }, {
243
- iconClass: 'time',
244
- name: '剩余时间',
245
- value: '--'
246
- }],
247
- faultTimer: null, // 当前故障定时器
248
- ParamsMode: new Map([[0, '自主控制'], [1, '本地手动'], [2, '平台控制'], [3, '配置软件控制'], [4, '遥控器控制'], [5, '黄闪器控制'], [6, '降级控制'], [7, '脚本控制'], [8, '算法控制']]),
249
- ParamsModeEn: new Map([[0, 'Autonomous Control'], [1, 'Local Manual'], [2, 'Platform Control'], [3, 'Configuration Software Control'], [4, 'Remote Control'], [5, 'Yellow Flasher Control'], [6, 'Degradation Control'], [7, 'Script Control'], [8, 'Algorithm Control']]),
250
- ParamsControl: new Map([[0, '多时段'], [1, '黄闪'], [2, '全红'], [3, '关灯'], [4, '步进'], [5, '定周期控制'], [6, '单点感应控制'], [7, '协调感应控制'], [8, '方案选择控制'], [9, '自适应控制'], [10, '无电缆控制'], [11, '有电缆控制'], [12, '行人过街控制'], [13, '方案恢复过渡'], [14, '相位驻留'], [15, '通道检测'], [16, '方向锁定'], [17, '韦伯斯特单点控制'], [18, '预留18'], [19, '感应式行人过街'], [20, '方案干预'], [100, '方案干预'], [21, '预留21'], [22, '相位锁定'], [23, '相位放行控制'], [24, '紧急控制'], [99, '设备维护']]),
251
- ParamsControlEn: new Map([[0, 'Multi Period'], [1, 'Yellow Flash Control'], [2, 'Red Control'], [3, 'Dark Control'], [4, 'Step'], [5, 'Fixed_Cycle Control'], [6, 'Free Control'], [7, 'Coordinated Induction Control'], [8, 'Pattern Selection Control'], [9, 'Adaptive Control'], [10, 'Wireless Control'], [11, 'Cable Control'], [12, 'Pedestrian Crossing Control'], [13, 'Pattern recovery'], [14, 'Phase dwell'], [15, 'Channel Detection'], [16, 'Direction lock'], [17, 'Webster Single Point Coordination'], [18, 'Reserving18'], [19, 'Inductive Pedestrian Crossing Control'], [20, 'Program Intervention'], [100, 'Program Intervention'], [21, 'Reserving21'], [22, 'Priority Control'], [23, 'Close Phase'], [24, 'Emergency Control'], [99, 'Device Mantenance']]),
252
- phaseType: new Map([[1, '红'], [2, '黄'], [3, '绿']]), // phaseType表示红,黄,绿
253
- phaseTypeEn: new Map([[1, 'Red'], [2, 'Yellow'], [3, 'Green']]), // phaseType表示红,黄,绿
254
- mode: '2',
255
- loading: {},
256
- modelList: [{
257
- id: 1,
258
- iconClass: 'huangshan',
259
- permission: 'configer:manual:senior',
260
- iconName: '黄闪'
261
- }, {
262
- id: 2,
263
- iconClass: 'quanhong',
264
- permission: 'configer:manual:senior',
265
- iconName: '全红'
266
- }, {
267
- id: 3,
268
- iconClass: 'guandeng',
269
- permission: 'configer:manual:senior',
270
- iconName: '关灯'
271
- }, {
272
- id: 4,
273
- iconClass: 'bujin',
274
- permission: 'configer:manual:dwell',
275
- iconName: '步进'
276
- }, {
277
- id: 5,
278
- iconClass: 'dingzhouqi',
279
- permission: 'configer:manual:base',
280
- iconName: '定周期'
281
- }, {
282
- id: 6,
283
- iconClass: 'ganyingkongzhi',
284
- permission: 'configer:manual:base',
285
- iconName: '感应控制'
286
- }, {
287
- id: 9,
288
- iconClass: 'zishiying',
289
- permission: 'configer:manual:base',
290
- iconName: '自适应控制'
291
- }, {
292
- id: 10,
293
- iconClass: 'wuxianlan',
294
- permission: 'configer:manual:base',
295
- iconName: '无电缆协调'
296
- }, {
297
- id: 12,
298
- iconClass: 'xingrenguojie',
299
- permission: 'configer:manual:base',
300
- iconName: '行人过街'
301
- }, {
302
- id: 19,
303
- iconClass: 'ganyingshixingrenguojie',
304
- permission: 'configer:manual:base',
305
- iconName: '感应式行人过街控制'
306
- }],
307
- currModel: -1,
308
- preselectModel: -1, // 预选方案
309
- preselectStages: -1, // 预选阶段
310
- closePhase: [],
311
- isOperation: false, // 是否为手动可操作状态
312
- tempPatternid: 0, // 控制方式手动操作的情况下的控制编号的临时值。
313
- tempDelay: 0, // 控制方式手动操作的情况下的延迟时间的临时值。
314
- tempDuration: 0, // 控制方式手动操作的情况下的持续时间的临时值。
315
- // phaseList: [], // 当前相位集合
316
- faultvisible: false,
317
- isClosePhase: false, // 是否在相位关断
318
- toPage: 1, // 与哪一个页面交互,1 代表路口信息页面,3代表 相位关断页面
319
- specialcontrolList: [{ // 特殊控制
320
- id: 23,
321
- isShow: true,
322
- permission: 'configer:manual:optimize',
323
- iconClass: 'closephase'
324
- }, {
325
- id: 22,
326
- isShow: true,
327
- permission: 'configer:manual:optimize',
328
- iconClass: 'lockingphase'
329
- }, {
330
- id: 100,
331
- isShow: true,
332
- permission: 'configer:manual:optimize',
333
- iconClass: 'tentativeplan'
334
- }, {
335
- id: 24,
336
- isShow: true,
337
- permission: 'configer:manual:preempt',
338
- iconClass: 'prioritycontrol'
339
- }, {
340
- id: 25,
341
- permission: 'configer:manual:optimize',
342
- isShow: this.realtimeStatusModalvisible,
343
- iconClass: 'azimuthlocking'
344
- }],
345
- phaseRings: [],
346
- curFaultList: [],
347
- confirmedFault: [],
348
- ignoredFault: [],
349
- untreatedFault: [],
350
- patternAll: [],
351
- patternSelect: [], // 所有方案id
352
- specialPage: '', // 哪一个特殊控制页面
353
- nextcycleefficcontrol: [5, 6, 9, 10, 12, 19] // 下周期生效的控制方式
354
- }
355
- },
356
- watch: {
357
- agentId: {
358
- handler: function (val) {
359
- this.getIntersectionInfo(val)
360
- },
361
- // 深度观察监听
362
- deep: true
363
- },
364
- statusData: {
365
- handler: function (val) {
366
- this.initData()
367
- this.getPedPhasePos()
368
- },
369
- // 深度观察监听
370
- deep: true
371
- },
372
- phaseList: {
373
- handler: function (val, oldVal) {
374
- this.getPedPhasePos()
375
- },
376
- // 深度观察监听
377
- deep: true
378
- },
379
- Token: {
380
- handler: function (val) {
381
- this.setPropsToken(val)
382
- }
383
- },
384
- roadDirection: {
385
- handler: function (val) {
386
- if (val === 'left' || val === 'right') {
387
- this.PhaseDataModel = new PhaseDataModel(val)
388
- }
389
- }
390
- }
391
- },
392
- created () {
393
- this.setHost(this.reqUrl)
394
- this.PhaseDataModel = new PhaseDataModel(this.roadDirection)
395
- this.CrossDiagramMgr = new CrossDiagramMgr()
396
- if (this.realtimeStatusModalvisible === false) {
397
- this.changeStatus()
398
- }
399
- this.getIntersectionInfo(this.agentId)
400
- },
401
- async mounted () {
402
- this.setPropsToken(this.Token)
403
- // await this.getPhase()
404
- this.getFault()
405
- this.initData()
406
- },
407
- methods: {
408
- setHost (host) {
409
- // 获取组件外传入的token,便于独立组件调用接口
410
- if (host && host !== '') {
411
- setHost(host)
412
- }
413
- },
414
- getIntersectionInfo (agentid) {
415
- // 获取路口信息
416
- getIntersectionInfo(agentid).then(res => {
417
- this.patternAll = res.data.data.param.patternList
418
- this.allPatternList = res.data.data.param.patternList
419
- this.overlap = res.data.data.param.overlaplList
420
- this.patternSelect = res.data.data.param.patternList.map(item => {
421
- return {
422
- value: item.id,
423
- label: item.desc ? item.desc : '' + item.id ? item.id : ''
424
- }
425
- })
426
- })
427
- },
428
- getFault () {
429
- this.getFaultById()
430
- this.faultTimer = setInterval(() => {
431
- this.getFaultById()
432
- }, 30000)
433
- },
434
- getPedPhasePos () {
435
- let ringDataModel = new RingDataModel(this.statusData, this.phaseList)
436
- this.sidewalkPhaseData = ringDataModel.getPedPhasePos()
437
- this.ringDataModel = ringDataModel
438
- },
439
- clearFaultInterval () {
440
- if (this.faultTimer !== null) {
441
- clearInterval(this.faultTimer) // 清除流量定时器
442
- this.faultTimer = null
443
- }
444
- },
445
- initData () {
446
- this.crossStatusData = JSON.parse(JSON.stringify(this.statusData))
447
- let TscData = JSON.parse(JSON.stringify(this.crossStatusData))
448
- this.currModel = TscData.control
449
- this.controlData = this.handleGetData(TscData)
450
- this.handleGetPhaseClose()
451
- },
452
- lockScreen () {
453
- this.loading = this.$loading({
454
- lock: true,
455
- text: 'Loading',
456
- spinner: 'el-icon-loading',
457
- background: 'rgba(0, 0, 0, 0.5)'
458
- })
459
- },
460
- unlockScreen () {
461
- this.loading.close()
462
- },
463
- selectModel (value) {
464
- if (!this.isOperation) return
465
- this.preselectStages = -1
466
- this.preselectModel = value
467
- },
468
- selectStages (value) {
469
- if (!this.isOperation) return
470
- if (this.preselectStages !== -1) {
471
- if (this.preselectStages === value) {
472
- this.preselectStages = -1
473
- } else {
474
- this.preselectStages = value
475
- this.preselectModel = 4 // 如果选了阶段,默认控制方式为步进
476
- }
477
- } else {
478
- this.preselectStages = value
479
- this.preselectModel = 4 // 如果选了阶段,默认控制方式为步进
480
- }
481
- },
482
- changeStatus () {
483
- this.toPage = 1
484
- this.isOperation = true
485
- if (this.modelList.filter(ele => ele.id === 0).length === 0) {
486
- let autonomyControl = {
487
- id: 0,
488
- iconClass: 'zizhukongzhi',
489
- permission: 'configer:manual:renew',
490
- iconName: '自主控制'
491
- }
492
- this.modelList.push(autonomyControl)
493
- }
494
- },
495
- handleGetData (data) {
496
- let that = this
497
- if (data.name === '') {
498
- if (that.$i18n.locale === 'en') {
499
- data.name = 'Pattern' + data.patternid
500
- } else if (that.$i18n.locale === 'zh') {
501
- data.name = '方案' + data.patternid
502
- }
503
- }
504
- Object.keys(data).forEach(function (key) {
505
- if (that.$i18n.locale === 'en') {
506
- if (key === 'mode') {
507
- if (that.ParamsModeEn.get(data[key]) !== undefined) {
508
- data[key] = that.ParamsModeEn.get(data[key])
509
- } else {
510
- data[key] = that.ParamsModeEn.get(0)
511
- }
512
- }
513
- // if (key === 'control') {
514
- // data[key] = that.ParamsControlEn.get(data[key])
515
- // }
516
- if (key === 'phase') {
517
- for (let val of data[key]) {
518
- val.type = that.phaseTypeEn.get(val.type)
519
- }
520
- }
521
- } else if (that.$i18n.locale === 'zh') {
522
- if (key === 'mode') {
523
- if (that.ParamsMode.get(data[key]) !== undefined) {
524
- data[key] = that.ParamsMode.get(data[key])
525
- } else {
526
- data[key] = that.ParamsMode.get(0)
527
- }
528
- }
529
- if (key === 'control') {
530
- data[key] = that.ParamsControl.get(data[key])
531
- }
532
- if (key === 'phase') {
533
- for (let val of data[key]) {
534
- val.type = that.phaseType.get(val.type)
535
- }
536
- }
537
- }
538
- })
539
- return data
540
- },
541
- closeManualModal () {
542
- this.isOperation = false
543
- this.preselectModel = -1
544
- this.preselectStages = -1
545
- this.tempPatternid = 0
546
- this.tempDelay = 0
547
- this.tempDuration = 0
548
- this.modelList = this.modelList.filter((item) => {
549
- return item.id !== 0
550
- })
551
- this.toPage = 1
552
- },
553
- handleManualConfirm (manualInfo) {
554
- this.$emit('handleManualConfirm', manualInfo)
555
- },
556
- patternCommit (manualInfo) {
557
- let that = this
558
- let control = {}
559
- if (that.preselectModel === -1) {
560
- this.$message.error(this.$t('openatccomponents.overview.noselectcontroltip'))
561
- return
562
- }
563
- that.ParamsMode.forEach(function (value, key, map) {
564
- if (that.controlData.mode === value) {
565
- control.mode = key
566
- }
567
- })
568
- control.control = that.preselectModel
569
- // control.terminal = isNaN(parseInt(manualInfo.tempPatternid)) ? Number(manualInfo.tempPatternid.replace(/[^0-9]/ig, '')) : manualInfo.tempPatternid
570
- control.terminal = Number(manualInfo.tempPatternid)
571
- // control.delay = Number(manualInfo.tempDelay)
572
- control.duration = Number(manualInfo.tempDuration)
573
- control.value = that.preselectStages === -1 ? 0 : that.preselectStages
574
- if (control.control === 0) {
575
- // 恢复自主控制(多时段)时,value为当前控制方式
576
- control.value = this.currModel
577
- }
578
- if (!this.realtimeStatusModalvisible) {
579
- console.log(control)
580
- this.$emit('patternCommitCallback', control)
581
- return
582
- }
583
- this.lockScreen()
584
- putTscControl(control).then(data => {
585
- that.unlockScreen()
586
- let success = 0
587
- if (!data.data.success) {
588
- if (data.data.code === '4002' && data.data.data.errorCode === '4209') {
589
- let success = data.data.data.content.success
590
- if (success !== 0) {
591
- let errormsg = 'openatccomponents.overview.putTscControlError' + success
592
- this.$message.error(this.$t(errormsg))
593
- return
594
- }
595
- }
596
- that.$message.error(getMessageByCode(data.data.code, that.$i18n.locale))
597
- return
598
- }
599
- if (data.data.data && data.data.data.data) {
600
- success = data.data.data.data.success
601
- if (success !== 0) {
602
- let errormsg = 'openatccomponents.overview.putTscControlError' + success
603
- that.$message.error(this.$t(errormsg))
604
- return
605
- }
606
- }
607
- // this.closeManualModal()
608
- if (this.nextcycleefficcontrol.indexOf(that.currModel) !== -1 && this.nextcycleefficcontrol.indexOf(that.preselectModel) !== -1) {
609
- that.$message.success(this.$t('openatccomponents.overview.nextcycleeffic'))
610
- return
611
- }
612
- if (that.preselectModel === 4) {
613
- that.$message.success(this.$t('openatccomponents.overview.transitioneffic'))
614
- return
615
- }
616
- if (success === 0) {
617
- that.$message.success(this.$t('openatccomponents.common.download'))
618
- }
619
- }).catch(error => {
620
- that.unlockScreen()
621
- console.log(error)
622
- })
623
- },
624
- getPhase () {
625
- let _this = this
626
- return new Promise(function (resolve, reject) {
627
- uploadSingleTscParam('phase', _this.agentId).then(data => {
628
- let res = data.data
629
- if (!res.success) {
630
- if (res.code === '4003') {
631
- _this.$message.error(_this.$t('openatccomponents.errorTip.devicenotonline'))
632
- return
633
- }
634
- _this.$message.error(getMessageByCode(data.data.code, _this.$i18n.locale))
635
- return
636
- }
637
- _this.phaseList = res.data.data.phaseList
638
- resolve()
639
- })
640
- })
641
- },
642
- handleFaultsVisible () {
643
- this.faultvisible = !this.faultvisible
644
- },
645
- handleGetPhaseClose () {
646
- if (this.crossStatusData.phase) {
647
- this.crossStatusData.phase = this.crossStatusData.phase.map(ele => {
648
- return {
649
- ...ele,
650
- close: ele.close || 0,
651
- locktype: 0 // 默认所有相位显示解锁状态
652
- }
653
- })
654
- // 相位关断标签
655
- let closePhase = []
656
- this.crossStatusData.phase.forEach(phase => {
657
- if (phase.close !== undefined && phase.close !== 0) {
658
- let typename
659
- switch (phase.close) {
660
- case 1: typename = ''
661
- break
662
- case 2: typename = this.$t('openatccomponents.overview.vehicle')
663
- break
664
- case 3: typename = this.$t('openatccomponents.overview.pedestrian')
665
- break
666
- default:typename = ''
667
- }
668
- closePhase.push({
669
- id: phase.id,
670
- typename: typename
671
- })
672
- }
673
- })
674
- this.closePhase = JSON.parse(JSON.stringify(closePhase))
675
- } else {
676
- this.closePhase = []
677
- }
678
- },
679
- selectSpecialModel (id) {
680
- let ringDataModel = new RingDataModel(this.statusData, this.phaseList)
681
- if (id === 23) {
682
- this.toPage = 3
683
- this.isClosePhase = true
684
- this.phaseRings = ringDataModel.initRingPhaseData()
685
- this.specialPage = 'closephase'
686
- } else if (id === 22) {
687
- this.toPage = 3
688
- this.isClosePhase = true
689
- this.phaseRings = ringDataModel.initRingPhaseData()
690
- this.specialPage = 'lockingphase'
691
- } else if (id === 100) {
692
- this.toPage = 3
693
- this.isClosePhase = true
694
- this.phaseRings = ringDataModel.initRingPhaseData()
695
- this.specialPage = 'tentativeplan'
696
- } else if (id === 24) {
697
- this.toPage = 3
698
- this.isClosePhase = true
699
- this.phaseRings = ringDataModel.initRingPhaseData()
700
- this.specialPage = 'prioritycontrol'
701
- } else if (id === 25) {
702
- this.toPage = 3
703
- this.isClosePhase = true
704
- this.phaseRings = ringDataModel.initRingPhaseData()
705
- this.specialPage = 'azimuthlocking'
706
- } else {
707
- this.isClosePhase = false
708
- this.specialPage = ''
709
- }
710
- },
711
- closePhaseBack () {
712
- // if (!this.realtimeStatusModalvisible) {
713
- // this.$emit('closePhaseBack')
714
- // return
715
- // }
716
- this.toPage = 3
717
- this.isClosePhase = false
718
- },
719
- closePhaseControl (controldata) {
720
- if (!this.realtimeStatusModalvisible) {
721
- this.$emit('patternCommitCallback', controldata)
722
- return
723
- }
724
- this.lockScreen()
725
- putTscControl(controldata).then(data => {
726
- this.unlockScreen()
727
- let success = 0
728
- if (!data.data.success) {
729
- if (data.data.code === '4002' && data.data.data.errorCode === '4209') {
730
- let success = data.data.data.content.success
731
- if (success !== 0) {
732
- let errormsg = 'openatccomponents.overview.putTscControlError' + success
733
- this.$message.error(this.$t(errormsg))
734
- return
735
- }
736
- }
737
- this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
738
- return
739
- }
740
- if (data.data.data && data.data.data.data) {
741
- success = data.data.data.data.success
742
- if (success !== 0) {
743
- let errormsg = 'openatccomponents.overview.putTscControlError' + success
744
- this.$message.error(this.$t(errormsg))
745
- return
746
- }
747
- }
748
- this.$message.success(this.$t('openatccomponents.common.download'))
749
- }).catch(error => {
750
- this.unlockScreen()
751
- console.log(error)
752
- })
753
- },
754
- // initRingPhaseData () {
755
- // // 环信息从单独上载相位信息里获取,以免相位锁定后,方案状态数据里没有rings,导致相位锁定控制列表无法显示
756
- // this.phaseRings = []
757
- // let map = {}
758
- // let dest = []
759
- // for (let i = 0; i < this.phaseList.length; i++) {
760
- // let ai = this.phaseList[i]
761
- // if (!map[ai.ring]) {
762
- // let addphse = this.addPhaseInfo(ai)
763
- // dest.push({
764
- // num: ai.ring,
765
- // phases: [{...ai, ...addphse}]
766
- // })
767
- // map[ai.ring] = ai
768
- // } else {
769
- // for (var j = 0; j < dest.length; j++) {
770
- // var dj = dest[j]
771
- // if (dj.num === ai.ring) {
772
- // let addphse = this.addPhaseInfo(ai)
773
- // dj.phases.push({...ai, ...addphse})
774
- // break
775
- // }
776
- // }
777
- // }
778
- // }
779
- // this.phaseRings = JSON.parse(JSON.stringify(dest))
780
- // },
781
- // addPhaseInfo (phase) {
782
- // let addphse = {}
783
- // addphse.name = this.$t('openatccomponents.overview.phase') + phase.id
784
- // addphse.desc = this.getPhaseDescription(phase.direction)
785
- // // 相位锁定选项默认都按照解锁状态显示
786
- // addphse.locktype = 0
787
- // addphse.close = 0
788
- // if (this.crossStatusData !== null && this.crossStatusData.phase) {
789
- // // 如果方案状态相位有close字段,这边就需要对应close状态进相位关断控制的选项里
790
- // let phaseStatus = this.crossStatusData.phase.filter(ele => ele.id === phase.id)[0]
791
- // addphse = {...addphse, ...phaseStatus}
792
- // }
793
- // return addphse
794
- // },
795
- // getPhaseDescription (phaseList) {
796
- // let list = []
797
- // for (let id of phaseList) {
798
- // let obj = {}
799
- // obj.id = id
800
- // obj.color = '#454545'
801
- // list.push(obj)
802
- // }
803
- // return list
804
- // },
805
- getFaultById () {
806
- let param = {
807
- agentId: this.agentId,
808
- isCurrentFault: true
809
- }
810
- GetAllFaultRange(param).then(res => {
811
- if (res.data.success !== true) {
812
- this.$message.error(getMessageByCode(res.data.code, this.$i18n.locale))
813
- return
814
- }
815
- this.curFaultList = res.data.data.content
816
- this.confirmedFault = this.curFaultList.filter(ele => ele.enumerate === '2')
817
- this.ignoredFault = this.curFaultList.filter(ele => ele.enumerate === '1')
818
- this.untreatedFault = this.curFaultList.filter(ele => ele.enumerate === '0')
819
- })
820
- },
821
- showFaultDetail () {
822
- this.$refs.faultDetail.onViewFaultClick()
823
- },
824
- setPropsToken (token) {
825
- // 获取组件外传入的token,便于独立组件调用接口
826
- if (token && token !== '') {
827
- setToken(token)
828
- }
829
- }
830
- },
831
- destroyed () {
832
- this.clearFaultInterval()
833
- }
834
- }
835
- </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="scheme-config openatc-scheme-config" style="height: 100%;">
14
+ <fault-detail-modal ref="faultDetail" :agentId="agentId" :isFromAtc="isFromAtc" @refreshFault="getFaultById"></fault-detail-modal>
15
+ <div style="height: 100%;">
16
+ <transition name="fade-right" mode="out-in"
17
+ :enter-active-class="toPage === 1 ? 'animated fadeInRight' : 'animated fadeInLeft'"
18
+ :leave-active-class="toPage === 1 ? 'animated fadeOutRight' : 'animated fadeOutLeft' ">
19
+ <div class="new" style="position: absolute;width: 100%;height:100%;" v-show="(isOperation && !isClosePhase)">
20
+ <ManualControlModalNew
21
+ ref="ManualControlModalNew"
22
+ :residentControlList="residentControlList"
23
+ :specialControlList="specialControlList"
24
+ :patternChooseControlList="patternChooseControlList"
25
+ :othersControlList="othersControlList"
26
+ :controlData="controlData"
27
+ :patternAll="patternAll"
28
+ :crossStatusData="crossStatusData"
29
+ :preselectModel="preselectModel"
30
+ :preselectStages="preselectStages"
31
+ :realtimeStatusModalvisible="realtimeStatusModalvisible"
32
+ :roadDirection="roadDirection"
33
+ :closePhaseRings="phaseRings"
34
+ :sidewalkPhaseData="sidewalkPhaseData"
35
+ :phaseList="phaseList"
36
+ :statusData="statusData"
37
+ :lockPhaseBtnName="lockPhaseBtnName"
38
+ :overlap="overlap"
39
+ :patternSelect="patternSelect"
40
+ :allPatternList="allPatternList"
41
+ @closeManualModal="closeManualModal"
42
+ @selectModel="selectModel"
43
+ @selectStages="selectStages"
44
+ @patternCommit="patternCommit"
45
+ @closePhaseBack="closePhaseBack"
46
+ @closePhaseControl="closePhaseControl"
47
+ @selectSpecialModel="selectSpecialModelNew" />
48
+ <!-- <ManualControlModal
49
+ :controlData="controlData"
50
+ :modelList="modelList"
51
+ :patternSelect="patternSelect"
52
+ :patternAll="patternAll"
53
+ :crossStatusData="crossStatusData"
54
+ :phaseList="phaseList"
55
+ :specialcontrolList="specialcontrolList"
56
+ :currModel="currModel"
57
+ :preselectModel="preselectModel"
58
+ :preselectStages="preselectStages"
59
+ :realtimeStatusModalvisible="realtimeStatusModalvisible"
60
+ :funcSort="funcSort"
61
+ :roadDirection="roadDirection"
62
+ @closeManualModal="closeManualModal"
63
+ @selectModel="selectModel"
64
+ @selectStages="selectStages"
65
+ @patternCommit="patternCommit"
66
+ @selectSpecialModel="selectSpecialModel" /> -->
67
+ </div>
68
+ </transition>
69
+ <!-- <transition name="fade-left" mode="out-in"
70
+ enter-active-class="animated fadeInRight"
71
+ leave-active-class="animated fadeOutRight">
72
+ <div style="position: absolute;width: 100%;height:100%" v-show="(isOperation && isClosePhase)">
73
+ <ClosePhaseControlModal
74
+ v-if="specialPage === 'closephase'"
75
+ :controlData="controlData"
76
+ :closePhaseRings="phaseRings"
77
+ :sidewalkPhaseData="sidewalkPhaseData"
78
+ :realtimeStatusModalvisible="realtimeStatusModalvisible"
79
+ :roadDirection="roadDirection"
80
+ @closePhaseBack="closePhaseBack"
81
+ @closePhaseControl="closePhaseControl" /> -->
82
+ <!-- <LockingPhaseControlModal
83
+ v-if="specialPage === 'lockingphase'"
84
+ :roadDirection="roadDirection"
85
+ :phaseList="phaseList"
86
+ :patternStatus="statusData"
87
+ :lockPhaseBtnName="lockPhaseBtnName"
88
+ @closePhaseBack="closePhaseBack"
89
+ @closePhaseControl="closePhaseControl" /> -->
90
+ <!-- <TentativePlanControlModal
91
+ v-if="specialPage === 'tentativeplan'"
92
+ :realtimeStatusModalvisible="realtimeStatusModalvisible"
93
+ :controlData="controlData"
94
+ :phaseList="phaseList"
95
+ :overlap="overlap"
96
+ :patternSelect="patternSelect"
97
+ :allPatternList="allPatternList"
98
+ @closePhaseBack="closePhaseBack"
99
+ @closePhaseControl="closePhaseControl"
100
+ />
101
+ <priorityControl
102
+ v-if="specialPage === 'prioritycontrol'"
103
+ :realtimeStatusModalvisible="realtimeStatusModalvisible"
104
+ :phaseList="phaseList"
105
+ @closePhaseBack="closePhaseBack"
106
+ @closePhaseControl="closePhaseControl"
107
+ /> -->
108
+ <!-- <AzimuthLocking
109
+ v-if="specialPage === 'azimuthlocking'"
110
+ :realtimeStatusModalvisible="realtimeStatusModalvisible"
111
+ :phaseList="phaseList"
112
+ :patternStatus="statusData"
113
+ @closePhaseBack="closePhaseBack"
114
+ @closePhaseControl="closePhaseControl"
115
+ /> -->
116
+ <!-- </div>
117
+ </transition> -->
118
+
119
+ <transition name="fade-left" mode="out-in"
120
+ enter-active-class="animated fadeInLeft"
121
+ leave-active-class="animated fadeOutLeft">
122
+ <div class="right-control-part" style="position: absolute;width: 100%;" v-show="!isOperation">
123
+ <RealtimeStatusModal
124
+ :controlData="controlData"
125
+ :currModel="currModel"
126
+ :ip="ip"
127
+ :platform="platform"
128
+ :responseTime="responseTime"
129
+ :curFaultList="curFaultList"
130
+ :confirmedFault="confirmedFault"
131
+ :ignoredFault="ignoredFault"
132
+ :untreatedFault="untreatedFault"
133
+ :closePhase="closePhase"
134
+ :agentName="agentName"
135
+ :agentId="agentId"
136
+ :crossStatusData="crossStatusData"
137
+ :phaseList="phaseList"
138
+ :sidewalkPhaseData="sidewalkPhaseData"
139
+ :roadDirection="roadDirection"
140
+ @changeStatus="changeStatus"
141
+ @showFaultDetail="showFaultDetail"/>
142
+ </div>
143
+ </transition>
144
+ </div>
145
+ </div>
146
+ </template>
147
+
148
+ <script>
149
+ import { putTscControl } from '../../../api/control.js'
150
+ import { uploadSingleTscParam } from '../../../api/param.js'
151
+ import RealtimeStatusModal from './realtimeStatusModal'
152
+ import ManualControlModal from './manualControlModal'
153
+ import ManualControlModalNew from './manualControlModalNew'
154
+ import ClosePhaseControlModal from './closePhaselControlModal'
155
+ import LockingPhaseControlModal from './lockingPhaselControlModal'
156
+ import TentativePlanControlModal from './tentativeplancontrolmodal'
157
+ import AzimuthLocking from './azimuthlocking'
158
+ import priorityControl from './priorityControl'
159
+ // import { getFaultMesZh, getFaultMesEn } from '../../utils/faultcode.js'
160
+ import { getMessageByCode } from '../../../utils/responseMessage'
161
+ import { GetAllFaultRange } from '../../../api/fault'
162
+ import PhaseDataModel from '../IntersectionMap/crossDirection/utils.js'
163
+ import CrossDiagramMgr from '../../../EdgeMgr/controller/crossDiagramMgr.js'
164
+ import { setToken, setHost, getTheme } from '../../../utils/auth.js'
165
+ import RingDataModel from '../../../utils/RingDataModel.js'
166
+ import { getIntersectionInfo } from '../../../api/template'
167
+
168
+ export default {
169
+ name: 'scheme-config',
170
+ components: {
171
+ RealtimeStatusModal,
172
+ ManualControlModal,
173
+ ClosePhaseControlModal,
174
+ LockingPhaseControlModal,
175
+ priorityControl,
176
+ AzimuthLocking,
177
+ TentativePlanControlModal,
178
+ ManualControlModalNew
179
+ },
180
+ props: {
181
+ phaseList: {
182
+ type: Array,
183
+ default: () => []
184
+ },
185
+ reqUrl: {
186
+ type: String,
187
+ default: ''
188
+ },
189
+ responseTime: {
190
+ type: Number,
191
+ default: 0
192
+ },
193
+ statusData: {
194
+ type: Object,
195
+ required: true
196
+ },
197
+ agentName: {
198
+ type: String,
199
+ default: ''
200
+ },
201
+ // devStatus: {
202
+ // type: Number,
203
+ // default: 0
204
+ // },
205
+ agentId: {
206
+ type: String,
207
+ default: '0'
208
+ },
209
+ ip: {
210
+ type: String
211
+ },
212
+ // allPatternList: {
213
+ // type: Array
214
+ // },
215
+ // overlap: {
216
+ // type: Array
217
+ // },
218
+ platform: {
219
+ type: String
220
+ },
221
+ realtimeStatusModalvisible: {
222
+ type: Boolean,
223
+ default: true
224
+ },
225
+ lockPhaseBtnName: {
226
+ type: String
227
+ },
228
+ Token: {
229
+ type: String,
230
+ default: ''
231
+ },
232
+ funcSort: {
233
+ type: String,
234
+ default: 'allFunc'
235
+ },
236
+ roadDirection: {
237
+ type: String,
238
+ default: 'right'
239
+ },
240
+ isFromAtc: {
241
+ type: Boolean,
242
+ default: true
243
+ }
244
+ },
245
+ data () {
246
+ return {
247
+ crossStatusData: null,
248
+ controlData: {},
249
+ control: '',
250
+ allPatternList: [],
251
+ overlap: [],
252
+ sidewalkPhaseData: [],
253
+ list: [{
254
+ iconClass: 'model',
255
+ name: '控制模式',
256
+ value: '--'
257
+ }, {
258
+ iconClass: 'cycle',
259
+ name: '周期',
260
+ value: '--'
261
+ }, {
262
+ iconClass: 'time',
263
+ name: '当前时间',
264
+ value: '--'
265
+ }, {
266
+ iconClass: 'maincontrol',
267
+ name: '控制方式',
268
+ value: '--'
269
+ }, {
270
+ iconClass: 'phasediff',
271
+ name: '相位差',
272
+ value: '--'
273
+ }, {
274
+ iconClass: 'time',
275
+ name: '剩余时间',
276
+ value: '--'
277
+ }],
278
+ faultTimer: null, // 当前故障定时器
279
+ ParamsMode: new Map([[0, '自主控制'], [1, '本地手动'], [2, '平台控制'], [3, '配置软件控制'], [4, '遥控器控制'], [5, '黄闪器控制'], [6, '降级控制'], [7, '脚本控制'], [8, '算法控制']]),
280
+ ParamsModeEn: new Map([[0, 'Autonomous Control'], [1, 'Local Manual'], [2, 'Platform Control'], [3, 'Configuration Software Control'], [4, 'Remote Control'], [5, 'Yellow Flasher Control'], [6, 'Degradation Control'], [7, 'Script Control'], [8, 'Algorithm Control']]),
281
+ ParamsControl: new Map([[0, '多时段'], [1, '黄闪'], [2, '全红'], [3, '关灯'], [4, '步进'], [5, '定周期控制'], [6, '单点感应控制'], [7, '协调感应控制'], [8, '方案选择控制'], [9, '自适应控制'], [10, '无电缆控制'], [11, '有电缆控制'], [12, '行人过街控制'], [13, '方案恢复过渡'], [14, '相位驻留'], [15, '通道检测'], [16, '方向锁定'], [17, '韦伯斯特单点控制'], [18, '预留18'], [19, '感应式行人过街'], [20, '方案干预'], [100, '方案干预'], [21, '预留21'], [22, '相位锁定'], [23, '相位放行控制'], [24, '紧急控制'], [99, '设备维护']]),
282
+ ParamsControlEn: new Map([[0, 'Multi Period'], [1, 'Yellow Flash Control'], [2, 'Red Control'], [3, 'Dark Control'], [4, 'Step'], [5, 'Fixed_Cycle Control'], [6, 'Free Control'], [7, 'Coordinated Induction Control'], [8, 'Pattern Selection Control'], [9, 'Adaptive Control'], [10, 'Wireless Control'], [11, 'Cable Control'], [12, 'Pedestrian Crossing Control'], [13, 'Pattern recovery'], [14, 'Phase dwell'], [15, 'Channel Detection'], [16, 'Direction lock'], [17, 'Webster Single Point Coordination'], [18, 'Reserving18'], [19, 'Inductive Pedestrian Crossing Control'], [20, 'Program Intervention'], [100, 'Program Intervention'], [21, 'Reserving21'], [22, 'Priority Control'], [23, 'Close Phase'], [24, 'Emergency Control'], [99, 'Device Mantenance']]),
283
+ phaseType: new Map([[1, ''], [2, '黄'], [3, '绿']]), // phaseType表示红,黄,绿
284
+ phaseTypeEn: new Map([[1, 'Red'], [2, 'Yellow'], [3, 'Green']]), // phaseType表示红,黄,绿
285
+ mode: '2',
286
+ loading: {},
287
+ modelList: [{
288
+ id: 1,
289
+ iconClass: 'huangshan',
290
+ permission: 'configer:manual:senior',
291
+ iconName: '黄闪'
292
+ }, {
293
+ id: 2,
294
+ iconClass: 'quanhong',
295
+ permission: 'configer:manual:senior',
296
+ iconName: '全红'
297
+ }, {
298
+ id: 3,
299
+ iconClass: 'guandeng',
300
+ permission: 'configer:manual:senior',
301
+ iconName: '关灯'
302
+ }, {
303
+ id: 4,
304
+ iconClass: 'bujin',
305
+ permission: 'configer:manual:dwell',
306
+ iconName: '步进'
307
+ }, {
308
+ id: 5,
309
+ iconClass: 'dingzhouqi',
310
+ permission: 'configer:manual:base',
311
+ iconName: '定周期'
312
+ }, {
313
+ id: 6,
314
+ iconClass: 'ganyingkongzhi',
315
+ permission: 'configer:manual:base',
316
+ iconName: '感应控制'
317
+ }, {
318
+ id: 9,
319
+ iconClass: 'zishiying',
320
+ permission: 'configer:manual:base',
321
+ iconName: '自适应控制'
322
+ }, {
323
+ id: 10,
324
+ iconClass: 'wuxianlan',
325
+ permission: 'configer:manual:base',
326
+ iconName: '无电缆协调'
327
+ }, {
328
+ id: 12,
329
+ iconClass: 'xingrenguojie',
330
+ permission: 'configer:manual:base',
331
+ iconName: '行人过街'
332
+ }, {
333
+ id: 19,
334
+ iconClass: 'ganyingshixingrenguojie',
335
+ permission: 'configer:manual:base',
336
+ iconName: '感应式行人过街控制'
337
+ }],
338
+ residentControlList: [
339
+ {
340
+ type: '步进',
341
+ id: 4,
342
+ iconClass: 'bujin',
343
+ permission: 'configer:manual:dwell',
344
+ iconName: this.$t('openatccomponents.overview.modelList4'),
345
+ bgcolor: getTheme() === 'light' ? '#edf6ff' : '#243d59'
346
+ },
347
+ {
348
+ type: '阶段锁定',
349
+ id: 4,
350
+ iconClass: 'jieduansuoding',
351
+ permission: 'configer:manual:dwell',
352
+ iconName: this.$t('openatccomponents.overview.modelList4-'),
353
+ bgcolor: getTheme() === 'light' ? '#edf6ff' : '#243d59'
354
+ },
355
+ {
356
+ type: '相位锁定',
357
+ id: 22,
358
+ iconClass: 'xiangweisuoding',
359
+ permission: 'configer:manual:dwell',
360
+ iconName: this.$t('openatccomponents.overview.modelList22'),
361
+ bgcolor: getTheme() === 'light' ? '#edf6ff' : '#243d59'
362
+ },
363
+ {
364
+ type: '方向锁定',
365
+ id: 25,
366
+ iconClass: 'fangxiangsuoding',
367
+ permission: 'configer:manual:dwell',
368
+ iconName: this.$t('openatccomponents.overview.modelList25'),
369
+ bgcolor: getTheme() === 'light' ? '#edf6ff' : '#243d59'
370
+ }
371
+ ],
372
+ specialControlList: [
373
+ {
374
+ type: '黄闪',
375
+ id: 1,
376
+ iconClass: 'huangshan',
377
+ permission: 'configer:manual:senior',
378
+ iconName: this.$t('openatccomponents.overview.modelList1'),
379
+ bgcolor: getTheme() === 'light' ? '#edf6ff' : '#243d59'
380
+ }, {
381
+ type: '全红',
382
+ id: 2,
383
+ iconClass: 'quanhong',
384
+ permission: 'configer:manual:senior',
385
+ iconName: this.$t('openatccomponents.overview.modelList2'),
386
+ bgcolor: getTheme() === 'light' ? '#edf6ff' : '#243d59'
387
+ }, {
388
+ type: '关灯',
389
+ id: 3,
390
+ iconClass: 'guandeng',
391
+ permission: 'configer:manual:senior',
392
+ iconName: this.$t('openatccomponents.overview.modelList3'),
393
+ bgcolor: getTheme() === 'light' ? '#edf6ff' : '#243d59'
394
+ }
395
+ ],
396
+ patternChooseControlList: [
397
+ {
398
+ type: '定周期',
399
+ id: 5,
400
+ iconClass: 'dingzhouqi',
401
+ permission: 'configer:manual:base',
402
+ iconName: this.$t('openatccomponents.overview.modelList5'),
403
+ bgcolor: getTheme() === 'light' ? '#edf6ff' : '#243d59'
404
+ }, {
405
+ type: '单点感应',
406
+ id: 6,
407
+ iconClass: 'ganyingkongzhi',
408
+ permission: 'configer:manual:base',
409
+ iconName: this.$t('openatccomponents.overview.modelList6'),
410
+ bgcolor: getTheme() === 'light' ? '#edf6ff' : '#243d59'
411
+ }, {
412
+ type: '自适应控制',
413
+ id: 9,
414
+ iconClass: 'zishiying',
415
+ permission: 'configer:manual:base',
416
+ iconName: this.$t('openatccomponents.overview.modelList9'),
417
+ bgcolor: getTheme() === 'light' ? '#edf6ff' : '#243d59'
418
+ }, {
419
+ type: '无电缆协调',
420
+ id: 10,
421
+ iconClass: 'wuxianlan',
422
+ permission: 'configer:manual:base',
423
+ iconName: this.$t('openatccomponents.overview.modelList10'),
424
+ bgcolor: getTheme() === 'light' ? '#edf6ff' : '#243d59'
425
+ }, {
426
+ type: '行人过街',
427
+ id: 12,
428
+ iconClass: 'xingrenguojie',
429
+ permission: 'configer:manual:base',
430
+ iconName: this.$t('openatccomponents.overview.modelList12'),
431
+ bgcolor: getTheme() === 'light' ? '#edf6ff' : '#243d59'
432
+ }, {
433
+ type: '感应式行人过街',
434
+ id: 19,
435
+ iconClass: 'ganyingshixingrenguojie',
436
+ permission: 'configer:manual:base',
437
+ iconName: this.$t('openatccomponents.overview.modelList19'),
438
+ bgcolor: getTheme() === 'light' ? '#edf6ff' : '#243d59'
439
+ }
440
+ ],
441
+ othersControlList: [
442
+ { // 特殊控制
443
+ type: '相位关断',
444
+ id: 23,
445
+ permission: 'configer:manual:optimize',
446
+ iconClass: 'closephase',
447
+ iconName: this.$t('openatccomponents.overview.modelList23'),
448
+ bgcolor: getTheme() === 'light' ? '#edf6ff' : '#243d59'
449
+ }, {
450
+ type: '临时方案',
451
+ id: 100,
452
+ permission: 'configer:manual:optimize',
453
+ iconClass: 'tentativeplan',
454
+ iconName: this.$t('openatccomponents.overview.modelList100'),
455
+ bgcolor: getTheme() === 'light' ? '#edf6ff' : '#243d59'
456
+ }, {
457
+ type: '优先控制',
458
+ id: 24,
459
+ permission: 'configer:manual:preempt',
460
+ iconClass: 'prioritycontrol',
461
+ iconName: this.$t('openatccomponents.overview.modelList24'),
462
+ bgcolor: getTheme() === 'light' ? '#edf6ff' : '#243d59'
463
+ }],
464
+ currModel: -1,
465
+ preselectModel: -1, // 预选方案
466
+ preselectStages: -1, // 预选阶段
467
+ closePhase: [],
468
+ isOperation: false, // 是否为手动可操作状态
469
+ tempPatternid: 0, // 控制方式手动操作的情况下的控制编号的临时值。
470
+ tempDelay: 0, // 控制方式手动操作的情况下的延迟时间的临时值。
471
+ tempDuration: 0, // 控制方式手动操作的情况下的持续时间的临时值。
472
+ // phaseList: [], // 当前相位集合
473
+ faultvisible: false,
474
+ isClosePhase: false, // 是否在相位关断
475
+ toPage: 1, // 与哪一个页面交互,1 代表路口信息页面,3代表 相位关断页面
476
+ specialcontrolList: [{ // 特殊控制
477
+ id: 23,
478
+ isShow: true,
479
+ permission: 'configer:manual:optimize',
480
+ iconClass: 'closephase'
481
+ }, {
482
+ id: 22,
483
+ isShow: true,
484
+ permission: 'configer:manual:optimize',
485
+ iconClass: 'lockingphase'
486
+ }, {
487
+ id: 100,
488
+ isShow: true,
489
+ permission: 'configer:manual:optimize',
490
+ iconClass: 'tentativeplan'
491
+ }, {
492
+ id: 24,
493
+ isShow: true,
494
+ permission: 'configer:manual:preempt',
495
+ iconClass: 'prioritycontrol'
496
+ }, {
497
+ id: 25,
498
+ permission: 'configer:manual:optimize',
499
+ isShow: this.realtimeStatusModalvisible,
500
+ iconClass: 'azimuthlocking'
501
+ }],
502
+ phaseRings: [],
503
+ curFaultList: [],
504
+ confirmedFault: [],
505
+ ignoredFault: [],
506
+ untreatedFault: [],
507
+ patternAll: [],
508
+ patternSelect: [], // 所有方案id
509
+ specialPage: '', // 哪一个特殊控制页面
510
+ nextcycleefficcontrol: [5, 6, 9, 10, 12, 19] // 下周期生效的控制方式
511
+ }
512
+ },
513
+ watch: {
514
+ agentId: {
515
+ handler: function (val) {
516
+ this.getIntersectionInfo(val)
517
+ },
518
+ // 深度观察监听
519
+ deep: true
520
+ },
521
+ statusData: {
522
+ handler: function (val) {
523
+ this.initData()
524
+ this.getPedPhasePos()
525
+ },
526
+ // 深度观察监听
527
+ deep: true
528
+ },
529
+ phaseList: {
530
+ handler: function (val, oldVal) {
531
+ this.getPedPhasePos()
532
+ },
533
+ // 深度观察监听
534
+ deep: true
535
+ },
536
+ Token: {
537
+ handler: function (val) {
538
+ this.setPropsToken(val)
539
+ }
540
+ },
541
+ roadDirection: {
542
+ handler: function (val) {
543
+ if (val === 'left' || val === 'right') {
544
+ this.PhaseDataModel = new PhaseDataModel(val)
545
+ }
546
+ }
547
+ }
548
+ },
549
+ created () {
550
+ this.setHost(this.reqUrl)
551
+ this.PhaseDataModel = new PhaseDataModel(this.roadDirection)
552
+ this.CrossDiagramMgr = new CrossDiagramMgr()
553
+ if (this.realtimeStatusModalvisible === false) {
554
+ this.changeStatus()
555
+ }
556
+ this.getIntersectionInfo(this.agentId)
557
+ },
558
+ async mounted () {
559
+ this.setPropsToken(this.Token)
560
+ // await this.getPhase()
561
+ this.getFault()
562
+ this.initData()
563
+ },
564
+ methods: {
565
+ setHost (host) {
566
+ // 获取组件外传入的token,便于独立组件调用接口
567
+ if (host && host !== '') {
568
+ setHost(host)
569
+ }
570
+ },
571
+ getIntersectionInfo (agentid) {
572
+ // 获取路口信息
573
+ getIntersectionInfo(agentid).then(res => {
574
+ this.patternAll = res.data.data.param.patternList
575
+ this.allPatternList = res.data.data.param.patternList
576
+ this.overlap = res.data.data.param.overlaplList
577
+ this.patternSelect = res.data.data.param.patternList.map(item => {
578
+ return {
579
+ value: item.id,
580
+ label: item.desc ? item.desc : '' + item.id ? item.id : ''
581
+ }
582
+ })
583
+ })
584
+ },
585
+ getFault () {
586
+ this.getFaultById()
587
+ this.faultTimer = setInterval(() => {
588
+ this.getFaultById()
589
+ }, 30000)
590
+ },
591
+ getPedPhasePos () {
592
+ let ringDataModel = new RingDataModel(this.statusData, this.phaseList)
593
+ this.sidewalkPhaseData = ringDataModel.getPedPhasePos()
594
+ this.ringDataModel = ringDataModel
595
+ },
596
+ clearFaultInterval () {
597
+ if (this.faultTimer !== null) {
598
+ clearInterval(this.faultTimer) // 清除流量定时器
599
+ this.faultTimer = null
600
+ }
601
+ },
602
+ initData () {
603
+ this.crossStatusData = JSON.parse(JSON.stringify(this.statusData))
604
+ let TscData = JSON.parse(JSON.stringify(this.crossStatusData))
605
+ this.currModel = TscData.control
606
+ this.controlData = this.handleGetData(TscData)
607
+ this.handleGetPhaseClose()
608
+ },
609
+ lockScreen () {
610
+ this.loading = this.$loading({
611
+ lock: true,
612
+ text: 'Loading',
613
+ spinner: 'el-icon-loading',
614
+ background: 'rgba(0, 0, 0, 0.5)'
615
+ })
616
+ },
617
+ unlockScreen () {
618
+ this.loading.close()
619
+ },
620
+ selectModel (value) {
621
+ if (!this.isOperation) return
622
+ this.preselectStages = -1
623
+ this.preselectModel = value
624
+ },
625
+ selectStages (value) {
626
+ if (!this.isOperation) return
627
+ if (this.preselectStages !== -1) {
628
+ if (this.preselectStages === value) {
629
+ this.preselectStages = -1
630
+ } else {
631
+ this.preselectStages = value
632
+ this.preselectModel = 4 // 如果选了阶段,默认控制方式为步进
633
+ }
634
+ } else {
635
+ this.preselectStages = value
636
+ this.preselectModel = 4 // 如果选了阶段,默认控制方式为步进
637
+ }
638
+ },
639
+ changeStatus () {
640
+ this.toPage = 1
641
+ this.isOperation = true
642
+ this.$refs.ManualControlModalNew.init()
643
+ },
644
+ handleGetData (data) {
645
+ let that = this
646
+ if (data.name === '') {
647
+ if (that.$i18n.locale === 'en') {
648
+ data.name = 'Pattern' + data.patternid
649
+ } else if (that.$i18n.locale === 'zh') {
650
+ data.name = '方案' + data.patternid
651
+ }
652
+ }
653
+ Object.keys(data).forEach(function (key) {
654
+ if (that.$i18n.locale === 'en') {
655
+ if (key === 'mode') {
656
+ if (that.ParamsModeEn.get(data[key]) !== undefined) {
657
+ data[key] = that.ParamsModeEn.get(data[key])
658
+ } else {
659
+ data[key] = that.ParamsModeEn.get(0)
660
+ }
661
+ }
662
+ // if (key === 'control') {
663
+ // data[key] = that.ParamsControlEn.get(data[key])
664
+ // }
665
+ if (key === 'phase') {
666
+ for (let val of data[key]) {
667
+ val.type = that.phaseTypeEn.get(val.type)
668
+ }
669
+ }
670
+ } else if (that.$i18n.locale === 'zh') {
671
+ if (key === 'mode') {
672
+ if (that.ParamsMode.get(data[key]) !== undefined) {
673
+ data[key] = that.ParamsMode.get(data[key])
674
+ } else {
675
+ data[key] = that.ParamsMode.get(0)
676
+ }
677
+ }
678
+ if (key === 'control') {
679
+ data[key] = that.ParamsControl.get(data[key])
680
+ }
681
+ if (key === 'phase') {
682
+ for (let val of data[key]) {
683
+ val.type = that.phaseType.get(val.type)
684
+ }
685
+ }
686
+ }
687
+ })
688
+ return data
689
+ },
690
+ closeManualModal () {
691
+ this.isOperation = false
692
+ this.preselectModel = -1
693
+ this.preselectStages = -1
694
+ this.tempPatternid = 0
695
+ this.tempDelay = 0
696
+ this.tempDuration = 0
697
+ this.modelList = this.modelList.filter((item) => {
698
+ return item.id !== 0
699
+ })
700
+ this.toPage = 1
701
+ },
702
+ handleManualConfirm (manualInfo) {
703
+ this.$emit('handleManualConfirm', manualInfo)
704
+ },
705
+ patternCommit (manualInfo) {
706
+ let that = this
707
+ let control = {}
708
+ if (that.preselectModel === -1) {
709
+ this.$message.error(this.$t('openatccomponents.overview.noselectcontroltip'))
710
+ return
711
+ }
712
+ that.ParamsMode.forEach(function (value, key, map) {
713
+ if (that.controlData.mode === value) {
714
+ control.mode = key
715
+ }
716
+ })
717
+ control.control = that.preselectModel
718
+ // control.terminal = isNaN(parseInt(manualInfo.tempPatternid)) ? Number(manualInfo.tempPatternid.replace(/[^0-9]/ig, '')) : manualInfo.tempPatternid
719
+ control.terminal = manualInfo.tempPatternid === undefined ? null : Number(manualInfo.tempPatternid)
720
+ // control.delay = Number(manualInfo.tempDelay)
721
+ control.duration = Number(manualInfo.tempDuration)
722
+ control.value = that.preselectStages === -1 ? 0 : that.preselectStages
723
+ if (control.control === 0) {
724
+ // 恢复自主控制(多时段)时,value为当前控制方式
725
+ control.value = this.currModel
726
+ }
727
+ if (!this.realtimeStatusModalvisible) {
728
+ console.log(control)
729
+ this.$emit('patternCommitCallback', control)
730
+ return
731
+ }
732
+ this.lockScreen()
733
+ putTscControl(control).then(data => {
734
+ that.unlockScreen()
735
+ let success = 0
736
+ if (!data.data.success) {
737
+ if (data.data.code === '4002' && data.data.data.errorCode === '4209') {
738
+ let success = data.data.data.content.success
739
+ if (success !== 0) {
740
+ let errormsg = 'openatccomponents.overview.putTscControlError' + success
741
+ this.$message.error(this.$t(errormsg))
742
+ return
743
+ }
744
+ }
745
+ that.$message.error(getMessageByCode(data.data.code, that.$i18n.locale))
746
+ return
747
+ }
748
+ if (data.data.data && data.data.data.data) {
749
+ success = data.data.data.data.success
750
+ if (success !== 0) {
751
+ let errormsg = 'openatccomponents.overview.putTscControlError' + success
752
+ that.$message.error(this.$t(errormsg))
753
+ return
754
+ }
755
+ }
756
+ // this.closeManualModal()
757
+ if (this.nextcycleefficcontrol.indexOf(that.currModel) !== -1 && this.nextcycleefficcontrol.indexOf(that.preselectModel) !== -1) {
758
+ that.$message.success(this.$t('openatccomponents.overview.nextcycleeffic'))
759
+ return
760
+ }
761
+ if (that.preselectModel === 4) {
762
+ that.$message.success(this.$t('openatccomponents.overview.transitioneffic'))
763
+ return
764
+ }
765
+ if (success === 0) {
766
+ that.$message.success(this.$t('openatccomponents.common.download'))
767
+ }
768
+ }).catch(error => {
769
+ that.unlockScreen()
770
+ console.log(error)
771
+ })
772
+ },
773
+ getPhase () {
774
+ let _this = this
775
+ return new Promise(function (resolve, reject) {
776
+ uploadSingleTscParam('phase', _this.agentId).then(data => {
777
+ let res = data.data
778
+ if (!res.success) {
779
+ if (res.code === '4003') {
780
+ _this.$message.error(_this.$t('openatccomponents.errorTip.devicenotonline'))
781
+ return
782
+ }
783
+ _this.$message.error(getMessageByCode(data.data.code, _this.$i18n.locale))
784
+ return
785
+ }
786
+ _this.phaseList = res.data.data.phaseList
787
+ resolve()
788
+ })
789
+ })
790
+ },
791
+ handleFaultsVisible () {
792
+ this.faultvisible = !this.faultvisible
793
+ },
794
+ handleGetPhaseClose () {
795
+ if (this.crossStatusData.phase) {
796
+ this.crossStatusData.phase = this.crossStatusData.phase.map(ele => {
797
+ return {
798
+ ...ele,
799
+ close: ele.close || 0,
800
+ locktype: 0 // 默认所有相位显示解锁状态
801
+ }
802
+ })
803
+ // 相位关断标签
804
+ let closePhase = []
805
+ this.crossStatusData.phase.forEach(phase => {
806
+ if (phase.close !== undefined && phase.close !== 0) {
807
+ let typename
808
+ switch (phase.close) {
809
+ case 1: typename = ''
810
+ break
811
+ case 2: typename = this.$t('openatccomponents.overview.vehicle')
812
+ break
813
+ case 3: typename = this.$t('openatccomponents.overview.pedestrian')
814
+ break
815
+ default:typename = ''
816
+ }
817
+ closePhase.push({
818
+ id: phase.id,
819
+ typename: typename
820
+ })
821
+ }
822
+ })
823
+ this.closePhase = JSON.parse(JSON.stringify(closePhase))
824
+ } else {
825
+ this.closePhase = []
826
+ }
827
+ },
828
+ selectSpecialModelNew () {
829
+ let ringDataModel = new RingDataModel(this.statusData, this.phaseList)
830
+ this.phaseRings = ringDataModel.initRingPhaseData()
831
+ },
832
+ selectSpecialModel (id) {
833
+ let ringDataModel = new RingDataModel(this.statusData, this.phaseList)
834
+ if (id === 23) {
835
+ this.toPage = 3
836
+ this.isClosePhase = true
837
+ this.phaseRings = ringDataModel.initRingPhaseData()
838
+ this.specialPage = 'closephase'
839
+ } else if (id === 22) {
840
+ this.toPage = 3
841
+ this.isClosePhase = true
842
+ this.phaseRings = ringDataModel.initRingPhaseData()
843
+ this.specialPage = 'lockingphase'
844
+ } else if (id === 100) {
845
+ this.toPage = 3
846
+ this.isClosePhase = true
847
+ this.phaseRings = ringDataModel.initRingPhaseData()
848
+ this.specialPage = 'tentativeplan'
849
+ } else if (id === 24) {
850
+ this.toPage = 3
851
+ this.isClosePhase = true
852
+ this.phaseRings = ringDataModel.initRingPhaseData()
853
+ this.specialPage = 'prioritycontrol'
854
+ } else if (id === 25) {
855
+ this.toPage = 3
856
+ this.isClosePhase = true
857
+ this.phaseRings = ringDataModel.initRingPhaseData()
858
+ this.specialPage = 'azimuthlocking'
859
+ } else {
860
+ this.isClosePhase = false
861
+ this.specialPage = ''
862
+ }
863
+ },
864
+ closePhaseBack () {
865
+ // if (!this.realtimeStatusModalvisible) {
866
+ // this.$emit('closePhaseBack')
867
+ // return
868
+ // }
869
+ this.toPage = 3
870
+ this.isClosePhase = false
871
+ },
872
+ closePhaseControl (controldata) {
873
+ if (!this.realtimeStatusModalvisible) {
874
+ this.$emit('patternCommitCallback', controldata)
875
+ return
876
+ }
877
+ this.lockScreen()
878
+ putTscControl(controldata).then(data => {
879
+ this.unlockScreen()
880
+ let success = 0
881
+ if (!data.data.success) {
882
+ if (data.data.code === '4002' && data.data.data.errorCode === '4209') {
883
+ let success = data.data.data.content.success
884
+ if (success !== 0) {
885
+ let errormsg = 'openatccomponents.overview.putTscControlError' + success
886
+ this.$message.error(this.$t(errormsg))
887
+ return
888
+ }
889
+ }
890
+ this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
891
+ return
892
+ }
893
+ if (data.data.data && data.data.data.data) {
894
+ success = data.data.data.data.success
895
+ if (success !== 0) {
896
+ let errormsg = 'openatccomponents.overview.putTscControlError' + success
897
+ this.$message.error(this.$t(errormsg))
898
+ return
899
+ }
900
+ }
901
+ this.$message.success(this.$t('openatccomponents.common.download'))
902
+ }).catch(error => {
903
+ this.unlockScreen()
904
+ console.log(error)
905
+ })
906
+ },
907
+ // initRingPhaseData () {
908
+ // // 环信息从单独上载相位信息里获取,以免相位锁定后,方案状态数据里没有rings,导致相位锁定控制列表无法显示
909
+ // this.phaseRings = []
910
+ // let map = {}
911
+ // let dest = []
912
+ // for (let i = 0; i < this.phaseList.length; i++) {
913
+ // let ai = this.phaseList[i]
914
+ // if (!map[ai.ring]) {
915
+ // let addphse = this.addPhaseInfo(ai)
916
+ // dest.push({
917
+ // num: ai.ring,
918
+ // phases: [{...ai, ...addphse}]
919
+ // })
920
+ // map[ai.ring] = ai
921
+ // } else {
922
+ // for (var j = 0; j < dest.length; j++) {
923
+ // var dj = dest[j]
924
+ // if (dj.num === ai.ring) {
925
+ // let addphse = this.addPhaseInfo(ai)
926
+ // dj.phases.push({...ai, ...addphse})
927
+ // break
928
+ // }
929
+ // }
930
+ // }
931
+ // }
932
+ // this.phaseRings = JSON.parse(JSON.stringify(dest))
933
+ // },
934
+ // addPhaseInfo (phase) {
935
+ // let addphse = {}
936
+ // addphse.name = this.$t('openatccomponents.overview.phase') + phase.id
937
+ // addphse.desc = this.getPhaseDescription(phase.direction)
938
+ // // 相位锁定选项默认都按照解锁状态显示
939
+ // addphse.locktype = 0
940
+ // addphse.close = 0
941
+ // if (this.crossStatusData !== null && this.crossStatusData.phase) {
942
+ // // 如果方案状态相位有close字段,这边就需要对应close状态进相位关断控制的选项里
943
+ // let phaseStatus = this.crossStatusData.phase.filter(ele => ele.id === phase.id)[0]
944
+ // addphse = {...addphse, ...phaseStatus}
945
+ // }
946
+ // return addphse
947
+ // },
948
+ // getPhaseDescription (phaseList) {
949
+ // let list = []
950
+ // for (let id of phaseList) {
951
+ // let obj = {}
952
+ // obj.id = id
953
+ // obj.color = '#454545'
954
+ // list.push(obj)
955
+ // }
956
+ // return list
957
+ // },
958
+ getFaultById () {
959
+ let param = {
960
+ agentId: this.agentId,
961
+ isCurrentFault: true
962
+ }
963
+ GetAllFaultRange(param).then(res => {
964
+ if (res.data.success !== true) {
965
+ this.$message.error(getMessageByCode(res.data.code, this.$i18n.locale))
966
+ return
967
+ }
968
+ this.curFaultList = res.data.data.content
969
+ this.confirmedFault = this.curFaultList.filter(ele => ele.enumerate === '2')
970
+ this.ignoredFault = this.curFaultList.filter(ele => ele.enumerate === '1')
971
+ this.untreatedFault = this.curFaultList.filter(ele => ele.enumerate === '0')
972
+ })
973
+ },
974
+ showFaultDetail () {
975
+ this.$refs.faultDetail.onViewFaultClick()
976
+ },
977
+ setPropsToken (token) {
978
+ // 获取组件外传入的token,便于独立组件调用接口
979
+ if (token && token !== '') {
980
+ setToken(token)
981
+ }
982
+ }
983
+ },
984
+ destroyed () {
985
+ this.clearFaultInterval()
986
+ }
987
+ }
988
+ </script>