openatc-components 0.2.29 → 0.2.30

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 (473) 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 +158 -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 +1478 -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 +835 -835
  141. package/package/kisscomps/components/SchemeConfig/azimuthlocking/index.vue +313 -313
  142. package/package/kisscomps/components/SchemeConfig/azimuthlocking/utils.js +92 -92
  143. package/package/kisscomps/components/SchemeConfig/closePhaselControlModal/index.vue +195 -195
  144. package/package/kisscomps/components/SchemeConfig/index.js +2 -2
  145. package/package/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +198 -198
  146. package/package/kisscomps/components/SchemeConfig/manualControlModal/index.vue +235 -235
  147. package/package/kisscomps/components/SchemeConfig/priorityControl/index.vue +197 -197
  148. package/package/kisscomps/components/SchemeConfig/priorityControl/utils.js +163 -163
  149. package/package/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +275 -275
  150. package/package/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +1194 -1194
  151. package/package/kisscomps/components/SelectCrossPhase/index.vue +417 -417
  152. package/package/kisscomps/components/SelectCrossPhase/utils.js +142 -142
  153. package/package/kisscomps/components/StageBord/StageBord.vue +287 -287
  154. package/package/kisscomps/components/StageBord/index.js +2 -2
  155. package/package/kisscomps/components/StageStatus/StageStatus.vue +341 -341
  156. package/package/kisscomps/components/StageStatus/index.js +2 -2
  157. package/package/kisscomps/components/Stages/index.vue +211 -211
  158. package/package/kisscomps/components/SvgIcon/SvgIcon.vue +53 -53
  159. package/package/kisscomps/components/SvgIcon/index.js +2 -2
  160. package/package/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +1065 -1065
  161. package/package/kisscomps/components/XRDDirSelector/index.js +2 -2
  162. package/package/kisscomps/components/XiaoKanban/DirSelector.vue +356 -356
  163. package/package/kisscomps/components/XiaoKanban/index.vue +102 -102
  164. package/package/kisscomps/components/overView/index.vue +699 -699
  165. package/package/kisscomps/components/patternConfig/index.js +2 -2
  166. package/package/kisscomps/components/patternConfig/index.vue +1126 -1126
  167. package/package/kisscomps/components/patternConfig/pattern/patternTable.vue +399 -395
  168. package/package/kisscomps/components/patternConfig/pattern/planChart/model/coordinationModel.js +665 -665
  169. package/package/kisscomps/components/patternConfig/planContent.vue +576 -576
  170. package/package/kisscomps/components/patternConfig/planMenu.vue +329 -329
  171. package/package/kisscomps/components/patternConfig/utils.js +152 -152
  172. package/package/kisscomps/components/patternList/index.js +2 -2
  173. package/package/kisscomps/components/patternList/patternList.vue +585 -585
  174. package/package/kisscomps/index.js +123 -123
  175. package/package/kissui.js +216608 -0
  176. package/package/kissui.min.js +1 -1
  177. package/package.json +127 -127
  178. package/src/App.vue +24 -24
  179. package/src/EdgeMgr/EdgeModelBase.js +16 -16
  180. package/src/EdgeMgr/controller/crossDiagramMgr.js +125 -125
  181. package/src/api/authapi.js +31 -31
  182. package/src/api/config.js +21 -21
  183. package/src/api/control.js +106 -106
  184. package/src/api/cross.js +49 -49
  185. package/src/api/device.js +135 -135
  186. package/src/api/fault.js +66 -66
  187. package/src/api/index.js +24 -24
  188. package/src/api/login.js +46 -46
  189. package/src/api/optimize.js +72 -72
  190. package/src/api/param.js +165 -165
  191. package/src/api/passwdAssest.js +101 -101
  192. package/src/api/route.js +171 -171
  193. package/src/api/template.js +27 -27
  194. package/src/i18n/index.js +26 -26
  195. package/src/i18n/language/en.js +1431 -1431
  196. package/src/i18n/language/index.js +25 -25
  197. package/src/i18n/language/zh.js +1430 -1430
  198. package/src/icons/demo.css +539 -539
  199. package/src/icons/demo_index.html +8146 -8146
  200. package/src/icons/iconfont.css +1399 -1399
  201. package/src/icons/iconfont.json +2431 -2431
  202. package/src/icons/index.js +20 -20
  203. package/src/icons/svg/azimuthlocking.svg +26 -26
  204. package/src/icons/svg/bendi.svg +110 -110
  205. package/src/icons/svg/bujin.svg +36 -36
  206. package/src/icons/svg/connectBlue.svg +7 -7
  207. package/src/icons/svg/currentvolume.svg +0 -0
  208. package/src/icons/svg/custom-BRTlane.svg +40 -40
  209. package/src/icons/svg/custom-buslane.svg +40 -40
  210. package/src/icons/svg/custom-detector.svg +12 -12
  211. package/src/icons/svg/custom-east-bottom.svg +32 -32
  212. package/src/icons/svg/custom-east-top.svg +32 -32
  213. package/src/icons/svg/custom-ewped.svg +35 -35
  214. package/src/icons/svg/custom-nonmotorizedlane.svg +40 -40
  215. package/src/icons/svg/custom-north-left.svg +32 -32
  216. package/src/icons/svg/custom-north-right.svg +32 -32
  217. package/src/icons/svg/custom-peddetector.svg +17 -17
  218. package/src/icons/svg/custom-snped.svg +35 -35
  219. package/src/icons/svg/custom-south-left.svg +32 -32
  220. package/src/icons/svg/custom-south-right.svg +32 -32
  221. package/src/icons/svg/custom-tramlane.svg +40 -40
  222. package/src/icons/svg/custom-vehiclebranch.svg +40 -40
  223. package/src/icons/svg/custom-vehiclemainroad.svg +41 -41
  224. package/src/icons/svg/custom-west-bottom.svg +32 -32
  225. package/src/icons/svg/custom-west-top.svg +32 -32
  226. package/src/icons/svg/custom-xlped.svg +14 -14
  227. package/src/icons/svg/custom-xrped.svg +14 -14
  228. package/src/icons/svg/cutRed.svg +7 -7
  229. package/src/icons/svg/cycle.svg +0 -0
  230. package/src/icons/svg/dingzhouqi.svg +34 -34
  231. package/src/icons/svg/ganyingkongzhi.svg +30 -30
  232. package/src/icons/svg/guandeng.svg +81 -81
  233. package/src/icons/svg/huangshan.svg +71 -71
  234. package/src/icons/svg/maincontrol.svg +0 -0
  235. package/src/icons/svg/manualcontrolbackground.svg +51 -51
  236. package/src/icons/svg/manualcontrolbackground1.svg +62 -62
  237. package/src/icons/svg/manualcontrolbackgrounden.svg +62 -62
  238. package/src/icons/svg/model.svg +0 -0
  239. package/src/icons/svg/phasediff.svg +0 -0
  240. package/src/icons/svg/prioritycontrol.svg +21 -21
  241. package/src/icons/svg/quanhong.svg +86 -86
  242. package/src/icons/svg/shanghe.svg +11 -11
  243. package/src/icons/svg/shoudong.svg +103 -103
  244. package/src/icons/svg/tentativeplan.svg +28 -28
  245. package/src/icons/svg/time.svg +0 -0
  246. package/src/icons/svg/wuxianlan.svg +46 -46
  247. package/src/icons/svg/xiala.svg +11 -11
  248. package/src/icons/svg/xingrenguojie.svg +33 -33
  249. package/src/icons/svg/xitong.svg +89 -89
  250. package/src/icons/svg/youxian.svg +41 -41
  251. package/src/icons/svg/zizhukongzhi.svg +43 -43
  252. package/src/kisscomps/components/BoardCard/BoardCard.vue +112 -112
  253. package/src/kisscomps/components/BoardCard/index.js +2 -2
  254. package/src/kisscomps/components/Channelization/Channelization.vue +584 -584
  255. package/src/kisscomps/components/Channelization/index.js +2 -2
  256. package/src/kisscomps/components/ChannelizationFlowStatistic/ChannelizationFlowStatistic.vue +360 -360
  257. package/src/kisscomps/components/ChannelizationFlowStatistic/index.js +2 -2
  258. package/src/kisscomps/components/ChannelizationWithInterface/ChannelizationWithInterface.vue +518 -518
  259. package/src/kisscomps/components/ChannelizationWithInterface/index.js +2 -2
  260. package/src/kisscomps/components/CommonKanban/CommonKanban.vue +132 -132
  261. package/src/kisscomps/components/CommonKanban/index.js +2 -2
  262. package/src/kisscomps/components/DirectionListConfiguration/DirectionListConfiguration.vue +454 -454
  263. package/src/kisscomps/components/DirectionListConfiguration/index.js +2 -2
  264. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-east-bottom.vue +41 -41
  265. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-east-top.vue +60 -60
  266. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-ewped.vue +105 -105
  267. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-north-left.vue +60 -60
  268. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-north-right.vue +60 -60
  269. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-snped.vue +105 -105
  270. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-south-left.vue +60 -60
  271. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-south-right.vue +60 -60
  272. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-west-bottom.vue +60 -60
  273. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-west-top.vue +60 -60
  274. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-xlped.vue +30 -30
  275. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-xrped.vue +30 -30
  276. package/src/kisscomps/components/DirectionListConfiguration/svg/pedSvg.vue +78 -78
  277. package/src/kisscomps/components/DrawChannelization/drawsvg/basicCoordInfo.vue +181 -181
  278. package/src/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +255 -255
  279. package/src/kisscomps/components/DrawChannelization/drawsvg/detectorAssociatedComponent.vue +152 -152
  280. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/TextBox.vue +91 -91
  281. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +194 -194
  282. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/editText.vue +108 -108
  283. package/src/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +51 -51
  284. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +236 -236
  285. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +247 -247
  286. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +210 -210
  287. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +72 -72
  288. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +467 -467
  289. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +230 -230
  290. package/src/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +74 -74
  291. package/src/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +1005 -1005
  292. package/src/kisscomps/components/DrawChannelization/drawsvg/index.vue +110 -110
  293. package/src/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +707 -707
  294. package/src/kisscomps/components/DrawChannelization/drawsvg/overlapAssociatedComponent.vue +172 -172
  295. package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.vue +172 -172
  296. package/src/kisscomps/components/DrawChannelization/drawsvg/table.vue +99 -99
  297. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +87 -87
  298. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/phaseDataModel.js +32 -32
  299. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/phasePos.json +20 -20
  300. package/src/kisscomps/components/DrawChannelization/index.js +2 -2
  301. package/src/kisscomps/components/DrawChannelization/phaseDataMgr.js +278 -278
  302. package/src/kisscomps/components/ExpendConfig/ExpendConfig.vue +118 -118
  303. package/src/kisscomps/components/ExpendConfig/index.js +2 -2
  304. package/src/kisscomps/components/FaultDetailModal/FaultDetailModal.vue +178 -178
  305. package/src/kisscomps/components/FaultDetailModal/index.js +2 -2
  306. package/src/kisscomps/components/IntersectionDirectionSelection/IntersectionDirectionSelection.vue +158 -158
  307. package/src/kisscomps/components/IntersectionDirectionSelection/index.js +2 -2
  308. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/CrossRoadsSvg.vue +496 -496
  309. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/CustomRoadsSvg.vue +46 -46
  310. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionEWSvg.vue +300 -300
  311. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionSNSvg.vue +288 -288
  312. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampEastSvg.vue +391 -391
  313. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampNorthSvg.vue +336 -336
  314. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampSouthSvg.vue +345 -345
  315. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampWestSvg.vue +389 -389
  316. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkClickSvg.vue +1272 -1272
  317. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkSvg.vue +1190 -1190
  318. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeEastRoadsSvg.vue +402 -402
  319. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeNorthRoadsSvg.vue +361 -361
  320. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeSouthRoadsSvg.vue +368 -368
  321. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeWestRoadsSvg.vue +475 -475
  322. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LCrossRoadsSvg.vue +494 -494
  323. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeEastRoadsSvg.vue +401 -401
  324. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeNorthRoadsSvg.vue +360 -360
  325. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeSouthRoadsSvg.vue +367 -367
  326. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeWestRoadsSvg.vue +476 -476
  327. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/refreshSvg.vue +63 -63
  328. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/busMapSvg.vue +50 -50
  329. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/eastBusSvg.vue +167 -167
  330. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/northBusSvg.vue +168 -168
  331. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/southBusSvg.vue +168 -168
  332. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/westBusSvg.vue +169 -169
  333. package/src/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +1200 -1200
  334. package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/LphaseIconSvg.vue +197 -197
  335. package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/phaseIconSvg.vue +196 -196
  336. package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/rampPhaseIconSvg.vue +122 -122
  337. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.json +196 -196
  338. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.left.json +196 -196
  339. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.json +115 -115
  340. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.left.json +115 -115
  341. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/rampPos.json +52 -52
  342. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/sidePos.json +219 -219
  343. package/src/kisscomps/components/IntersectionMap/crossDirection/utils.js +84 -84
  344. package/src/kisscomps/components/IntersectionMap/index.js +2 -2
  345. package/src/kisscomps/components/IntersectionMap/intersectionmap.vue +199 -199
  346. package/src/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +530 -530
  347. package/src/kisscomps/components/IntersectionWithInterface/index.js +2 -2
  348. package/src/kisscomps/components/KanBan/index.js +2 -2
  349. package/src/kisscomps/components/KanBan/kanban.vue +225 -225
  350. package/src/kisscomps/components/MessageBox/index.vue +96 -96
  351. package/src/kisscomps/components/OverLap/OverLap.vue +235 -235
  352. package/src/kisscomps/components/OverLap/index.js +2 -2
  353. package/src/kisscomps/components/PatternOptimize/PatternOptimize.vue +272 -272
  354. package/src/kisscomps/components/PatternOptimize/index.js +2 -2
  355. package/src/kisscomps/components/PatternStatus/PatternStatus.vue +1478 -1478
  356. package/src/kisscomps/components/PatternStatus/index.js +2 -2
  357. package/src/kisscomps/components/PatternWalkSvg/PatternWalkSvg.vue +423 -423
  358. package/src/kisscomps/components/PatternWalkSvg/index.js +2 -2
  359. package/src/kisscomps/components/PhaseDirectionSelect/PhaseDirectionSelect.vue +126 -126
  360. package/src/kisscomps/components/PhaseDirectionSelect/index.js +2 -2
  361. package/src/kisscomps/components/PhaseDirectionText/PhaseDirectionText.vue +106 -106
  362. package/src/kisscomps/components/PhaseDirectionText/index.js +2 -2
  363. package/src/kisscomps/components/PhaseMarker/index.js +6 -6
  364. package/src/kisscomps/components/PhaseMarker/phasemarker.vue +215 -215
  365. package/src/kisscomps/components/PhaseMarker/svg/patternSvg.vue +121 -121
  366. package/src/kisscomps/components/PhaseMarker/svg/phase.vue +60 -60
  367. package/src/kisscomps/components/PhaseMarker/svg/phaseCount.vue +62 -62
  368. package/src/kisscomps/components/PhaseMarker/svg/phaseCountCycle.vue +62 -62
  369. package/src/kisscomps/components/PhaseMarker/svg/phaseSvg.vue +117 -117
  370. package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +835 -835
  371. package/src/kisscomps/components/SchemeConfig/azimuthlocking/index.vue +313 -313
  372. package/src/kisscomps/components/SchemeConfig/azimuthlocking/utils.js +92 -92
  373. package/src/kisscomps/components/SchemeConfig/closePhaselControlModal/index.vue +195 -195
  374. package/src/kisscomps/components/SchemeConfig/index.js +2 -2
  375. package/src/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +198 -198
  376. package/src/kisscomps/components/SchemeConfig/manualControlModal/index.vue +235 -235
  377. package/src/kisscomps/components/SchemeConfig/priorityControl/index.vue +197 -197
  378. package/src/kisscomps/components/SchemeConfig/priorityControl/utils.js +163 -163
  379. package/src/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +275 -275
  380. package/src/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +1194 -1194
  381. package/src/kisscomps/components/SelectCrossPhase/index.vue +417 -417
  382. package/src/kisscomps/components/SelectCrossPhase/utils.js +142 -142
  383. package/src/kisscomps/components/StageBord/StageBord.vue +287 -287
  384. package/src/kisscomps/components/StageBord/index.js +2 -2
  385. package/src/kisscomps/components/StageStatus/StageStatus.vue +341 -341
  386. package/src/kisscomps/components/StageStatus/index.js +2 -2
  387. package/src/kisscomps/components/Stages/index.vue +211 -211
  388. package/src/kisscomps/components/SvgIcon/SvgIcon.vue +53 -53
  389. package/src/kisscomps/components/SvgIcon/index.js +2 -2
  390. package/src/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +1065 -1065
  391. package/src/kisscomps/components/XRDDirSelector/index.js +2 -2
  392. package/src/kisscomps/components/XiaoKanban/DirSelector.vue +356 -356
  393. package/src/kisscomps/components/XiaoKanban/index.vue +102 -102
  394. package/src/kisscomps/components/overView/index.vue +699 -699
  395. package/src/kisscomps/components/patternConfig/index.js +2 -2
  396. package/src/kisscomps/components/patternConfig/index.vue +1126 -1126
  397. package/src/kisscomps/components/patternConfig/pattern/patternTable.vue +399 -395
  398. package/src/kisscomps/components/patternConfig/pattern/planChart/model/coordinationModel.js +665 -665
  399. package/src/kisscomps/components/patternConfig/planContent.vue +576 -576
  400. package/src/kisscomps/components/patternConfig/planMenu.vue +329 -329
  401. package/src/kisscomps/components/patternConfig/utils.js +152 -152
  402. package/src/kisscomps/components/patternList/index.js +2 -2
  403. package/src/kisscomps/components/patternList/patternList.vue +585 -585
  404. package/src/kisscomps/index.js +123 -123
  405. package/src/lib/publicjs/ArryListUtil.js +38 -38
  406. package/src/lib/publicjs/HttpurlMgr.js +45 -45
  407. package/src/lib/publicjs/KissApi.js +158 -158
  408. package/src/lib/publicjs/KissWSSub/Heartcheck.js +128 -128
  409. package/src/lib/publicjs/KissWSSub/KissWsSub.js +91 -91
  410. package/src/lib/publicjs/KissWSSub/KissWsSubByType.js +152 -152
  411. package/src/lib/publicjs/KissWSSub/SimuWsSubByType.js +44 -44
  412. package/src/lib/publicjs/KissWSSub/Sub.js +51 -51
  413. package/src/lib/publicjs/KissWSSub/SubChannel.js +119 -119
  414. package/src/lib/publicjs/basecomponents.js +65 -65
  415. package/src/lib/publicjs/localStorage.js +112 -112
  416. package/src/lib/publicjs/objdeepcopy.js +32 -32
  417. package/src/lib/publicjs/pageScroll.js +30 -30
  418. package/src/lib/publicjs/passwdAssest.js +101 -101
  419. package/src/lib/publicjs/styleclassfactory.js +32 -32
  420. package/src/main.js +50 -50
  421. package/src/router/index.js +63 -63
  422. package/src/store/getters.js +16 -16
  423. package/src/store/index.js +26 -26
  424. package/src/store/modules/globalParam.js +67 -67
  425. package/src/utils/ControlFormat.js +68 -68
  426. package/src/utils/RingDataModel.js +251 -251
  427. package/src/utils/auth.js +199 -199
  428. package/src/utils/conflct.js +250 -250
  429. package/src/utils/conflictList.js +87 -87
  430. package/src/utils/dateFormat.js +41 -41
  431. package/src/utils/errorcode.js +228 -228
  432. package/src/utils/fault.js +196 -196
  433. package/src/utils/faultcode.js +209 -209
  434. package/src/utils/index.js +69 -69
  435. package/src/utils/pedphasedesc.js +119 -119
  436. package/src/utils/phaseList.js +203 -203
  437. package/src/utils/phasedesc.js +144 -144
  438. package/src/utils/responseMessage.js +21 -21
  439. package/src/utils/validate.js +43 -43
  440. package/src/views/customchannelization.vue +49 -49
  441. package/src/views/home.1.vue +479 -479
  442. package/src/views/home.vue +93 -93
  443. package/src/views/intersection.vue +365 -365
  444. package/src/views/intersection2.vue +328 -328
  445. package/src/views/overView.vue +41 -41
  446. package/src/views/patternConfig.vue +609 -609
  447. package/src/views/schemeconfig.vue +173 -173
  448. package/static/apiconfig.json +451 -451
  449. package/static/styles/channelizatioon.scss +433 -433
  450. package/static/styles/common.scss +23 -23
  451. package/static/styles/commonkanban.scss +100 -100
  452. package/static/styles/dark/index.scss +2 -2
  453. package/static/styles/dark/theme/element-dark.scss +42 -42
  454. package/static/styles/index.scss +84 -84
  455. package/static/styles/intersection.scss +190 -190
  456. package/static/styles/light/index.scss +2 -2
  457. package/static/styles/light/theme/element-light.scss +42 -42
  458. package/static/styles/overview.scss +146 -146
  459. package/static/styles/patternConfig.scss +56 -56
  460. package/static/styles/schemeconfig.scss +501 -501
  461. package/static/styles/stages.scss +64 -64
  462. package/static/styles/uiComponents.scss +57 -57
  463. package/static/styles/xiaokanban.scss +50 -50
  464. package/static/token.json +2 -2
  465. package/test/e2e/custom-assertions/elementCount.js +27 -27
  466. package/test/e2e/nightwatch.conf.js +46 -46
  467. package/test/e2e/runner.js +48 -48
  468. package/test/e2e/specs/test.js +19 -19
  469. package/test/unit/.eslintrc +7 -7
  470. package/test/unit/jest.conf.js +30 -30
  471. package/test/unit/setup.js +3 -3
  472. package/test/unit/specs/HelloWorld.spec.js +11 -11
  473. package/src/node_modules/.package_versions.json +0 -1
@@ -1,835 +1,835 @@
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 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>