openatc-components 0.0.88 → 0.0.89

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 (393) 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 +90 -91
  19. package/config/prod.env.js +5 -5
  20. package/config/test.env.js +7 -7
  21. package/index.html +12 -12
  22. package/package/kisscomps/components/BoardCard/BoardCard.vue +89 -89
  23. package/package/kisscomps/components/BoardCard/index.js +2 -2
  24. package/package/kisscomps/components/Channelization/Channelization.vue +544 -0
  25. package/package/kisscomps/components/Channelization/index.js +2 -0
  26. package/package/kisscomps/components/ChannelizationWithInterface/ChannelizationWithInterface.vue +498 -0
  27. package/package/kisscomps/components/ChannelizationWithInterface/index.js +2 -0
  28. package/package/kisscomps/components/CommonKanban/CommonKanban.vue +118 -118
  29. package/package/kisscomps/components/CommonKanban/index.js +2 -2
  30. package/package/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +249 -0
  31. package/package/kisscomps/components/DrawChannelization/drawsvg/detectorAssociatedComponent.vue +152 -0
  32. package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/TextBox.vue +91 -0
  33. package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +176 -0
  34. package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/editText.vue +108 -0
  35. package/package/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +48 -0
  36. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +182 -0
  37. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +222 -0
  38. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +191 -0
  39. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +78 -0
  40. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +433 -0
  41. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +195 -0
  42. package/package/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +71 -0
  43. package/package/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +940 -0
  44. package/package/kisscomps/components/DrawChannelization/drawsvg/index.vue +119 -0
  45. package/package/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +563 -0
  46. package/package/kisscomps/components/DrawChannelization/drawsvg/overlapAssociatedComponent.vue +157 -0
  47. package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.check.vue +191 -0
  48. package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.syncOper.vue +331 -0
  49. package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.vue +157 -0
  50. package/package/kisscomps/components/DrawChannelization/drawsvg/table.vue +99 -0
  51. package/package/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +43 -0
  52. package/package/kisscomps/components/DrawChannelization/drawsvg/utils/phaseDataModel.js +32 -0
  53. package/package/kisscomps/components/DrawChannelization/drawsvg/utils/phasePos.json +20 -0
  54. package/package/kisscomps/components/DrawChannelization/index.js +2 -0
  55. package/package/kisscomps/components/DrawChannelization/phaseDataMgr.js +278 -0
  56. package/package/kisscomps/components/ExpendConfig/ExpendConfig.vue +114 -114
  57. package/package/kisscomps/components/ExpendConfig/index.js +2 -2
  58. package/package/kisscomps/components/FaultDetailModal/FaultDetailModal.vue +170 -170
  59. package/package/kisscomps/components/FaultDetailModal/index.js +2 -2
  60. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/CrossRoadsSvg.vue +497 -497
  61. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/CustomRoadsSvg.vue +46 -46
  62. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionEWSvg.vue +300 -300
  63. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionSNSvg.vue +288 -288
  64. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampEastSvg.vue +391 -391
  65. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampNorthSvg.vue +336 -336
  66. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampSouthSvg.vue +345 -345
  67. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampWestSvg.vue +389 -389
  68. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkSvg.vue +1179 -1179
  69. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeEastRoadsSvg.vue +402 -402
  70. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeNorthRoadsSvg.vue +361 -361
  71. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeSouthRoadsSvg.vue +368 -368
  72. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeWestRoadsSvg.vue +475 -475
  73. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LCrossRoadsSvg.vue +494 -494
  74. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeEastRoadsSvg.vue +401 -401
  75. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeNorthRoadsSvg.vue +360 -360
  76. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeSouthRoadsSvg.vue +367 -367
  77. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeWestRoadsSvg.vue +476 -476
  78. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/refreshSvg.vue +63 -63
  79. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/busMapSvg.vue +50 -50
  80. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/eastBusSvg.vue +167 -167
  81. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/northBusSvg.vue +168 -168
  82. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/southBusSvg.vue +168 -168
  83. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/westBusSvg.vue +169 -169
  84. package/package/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +912 -912
  85. package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/LphaseIconSvg.vue +112 -112
  86. package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/phaseIconSvg.vue +112 -112
  87. package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/rampPhaseIconSvg.vue +111 -111
  88. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.json +196 -196
  89. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.left.json +196 -196
  90. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.json +99 -99
  91. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.left.json +99 -99
  92. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/rampPos.json +52 -52
  93. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/sidePos.json +99 -99
  94. package/package/kisscomps/components/IntersectionMap/crossDirection/utils.js +78 -78
  95. package/package/kisscomps/components/IntersectionMap/index.js +2 -2
  96. package/package/kisscomps/components/IntersectionMap/intersectionmap.vue +153 -153
  97. package/package/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +518 -518
  98. package/package/kisscomps/components/IntersectionWithInterface/index.js +2 -2
  99. package/package/kisscomps/components/KanBan/index.js +2 -2
  100. package/package/kisscomps/components/KanBan/kanban.vue +219 -219
  101. package/package/kisscomps/components/MessageBox/index.vue +96 -0
  102. package/package/kisscomps/components/OverLap/OverLap.vue +207 -207
  103. package/package/kisscomps/components/OverLap/index.js +2 -2
  104. package/package/kisscomps/components/PatternStatus/PatternStatus.vue +888 -888
  105. package/package/kisscomps/components/PatternStatus/index.js +2 -2
  106. package/package/kisscomps/components/PatternWalkSvg/PatternWalkSvg.vue +423 -423
  107. package/package/kisscomps/components/PatternWalkSvg/index.js +2 -2
  108. package/package/kisscomps/components/PhaseMarker/index.js +6 -6
  109. package/package/kisscomps/components/PhaseMarker/phasemarker.vue +215 -215
  110. package/package/kisscomps/components/PhaseMarker/svg/patternSvg.vue +121 -121
  111. package/package/kisscomps/components/PhaseMarker/svg/phase.vue +60 -60
  112. package/package/kisscomps/components/PhaseMarker/svg/phaseCount.vue +62 -62
  113. package/package/kisscomps/components/PhaseMarker/svg/phaseCountCycle.vue +62 -62
  114. package/package/kisscomps/components/PhaseMarker/svg/phaseSvg.vue +117 -117
  115. package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +744 -744
  116. package/package/kisscomps/components/SchemeConfig/closePhaselControlModal/index.vue +195 -195
  117. package/package/kisscomps/components/SchemeConfig/index.js +2 -2
  118. package/package/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +198 -198
  119. package/package/kisscomps/components/SchemeConfig/manualControlModal/index.vue +219 -219
  120. package/package/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +263 -263
  121. package/package/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +1384 -1384
  122. package/package/kisscomps/components/StageBord/StageBord.vue +242 -242
  123. package/package/kisscomps/components/StageBord/index.js +2 -2
  124. package/package/kisscomps/components/StageStatus/StageStatus.vue +306 -306
  125. package/package/kisscomps/components/StageStatus/index.js +2 -2
  126. package/package/kisscomps/components/Stages/index.vue +139 -139
  127. package/package/kisscomps/components/SvgIcon/SvgIcon.vue +53 -53
  128. package/package/kisscomps/components/SvgIcon/index.js +2 -2
  129. package/package/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +522 -522
  130. package/package/kisscomps/components/XRDDirSelector/index.js +2 -2
  131. package/package/kisscomps/components/overView/index.vue +676 -676
  132. package/package/kisscomps/components/patternList/index.js +2 -2
  133. package/package/kisscomps/components/patternList/patternList.vue +562 -562
  134. package/package/kisscomps/index.js +96 -92
  135. package/package/kissui.min.js +1 -1
  136. package/package.json +4 -2
  137. package/src/App.vue +24 -24
  138. package/src/EdgeMgr/EdgeModelBase.js +16 -16
  139. package/src/EdgeMgr/controller/crossDiagramMgr.js +120 -120
  140. package/src/api/authapi.js +31 -31
  141. package/src/api/config.js +21 -21
  142. package/src/api/control.js +76 -76
  143. package/src/api/cross.js +33 -0
  144. package/src/api/fault.js +66 -66
  145. package/src/api/index.js +24 -24
  146. package/src/api/login.js +46 -46
  147. package/src/api/optimize.js +72 -72
  148. package/src/api/param.js +154 -154
  149. package/src/api/passwdAssest.js +101 -101
  150. package/src/api/template.js +27 -27
  151. package/src/i18n/index.js +26 -26
  152. package/src/i18n/language/en.js +1186 -1111
  153. package/src/i18n/language/index.js +25 -25
  154. package/src/i18n/language/zh.js +1185 -1110
  155. package/src/icons/demo.css +539 -539
  156. package/src/icons/iconfont.css +835 -835
  157. package/src/icons/iconfont.json +1444 -1444
  158. package/src/icons/index.js +20 -20
  159. package/src/icons/svg/bendi.svg +110 -110
  160. package/src/icons/svg/bujin.svg +36 -36
  161. package/src/icons/svg/connectBlue.svg +7 -7
  162. package/src/icons/svg/currentvolume.svg +0 -0
  163. package/src/icons/svg/custom-BRTlane.svg +40 -0
  164. package/src/icons/svg/custom-bicyclelane.svg +7 -0
  165. package/src/icons/svg/custom-buslane.svg +40 -0
  166. package/src/icons/svg/custom-detector.svg +12 -0
  167. package/src/icons/svg/custom-east-bottom.svg +32 -0
  168. package/src/icons/svg/custom-east-top.svg +32 -0
  169. package/src/icons/svg/custom-ewped.svg +35 -0
  170. package/src/icons/svg/custom-motorway.svg +7 -0
  171. package/src/icons/svg/custom-nonmotorizedlane.svg +40 -0
  172. package/src/icons/svg/custom-north-left.svg +32 -0
  173. package/src/icons/svg/custom-north-right.svg +32 -0
  174. package/src/icons/svg/custom-pedcrossing.svg +7 -0
  175. package/src/icons/svg/custom-peddetector.svg +17 -0
  176. package/src/icons/svg/custom-pedeastward.svg +9 -0
  177. package/src/icons/svg/custom-pedestrian.svg +7 -0
  178. package/src/icons/svg/custom-pednorthward.svg +9 -0
  179. package/src/icons/svg/custom-pedsouthward.svg +9 -0
  180. package/src/icons/svg/custom-pedwestward.svg +9 -0
  181. package/src/icons/svg/custom-secondcrossing.svg +7 -0
  182. package/src/icons/svg/custom-sectionpedestrian.svg +7 -0
  183. package/src/icons/svg/custom-snped.svg +35 -0
  184. package/src/icons/svg/custom-south-left.svg +32 -0
  185. package/src/icons/svg/custom-south-right.svg +32 -0
  186. package/src/icons/svg/custom-straightahead.svg +7 -0
  187. package/src/icons/svg/custom-tramlane.svg +40 -0
  188. package/src/icons/svg/custom-turnaround.svg +7 -0
  189. package/src/icons/svg/custom-turnleft.svg +7 -0
  190. package/src/icons/svg/custom-turnright.svg +7 -0
  191. package/src/icons/svg/custom-vehiclebranch.svg +40 -0
  192. package/src/icons/svg/custom-vehiclemainroad.svg +41 -0
  193. package/src/icons/svg/custom-west-bottom.svg +32 -0
  194. package/src/icons/svg/custom-west-top.svg +32 -0
  195. package/src/icons/svg/custom-xlped.svg +14 -0
  196. package/src/icons/svg/custom-xpedestrian.svg +7 -0
  197. package/src/icons/svg/custom-xrped.svg +14 -0
  198. package/src/icons/svg/cutRed.svg +7 -7
  199. package/src/icons/svg/cycle.svg +0 -0
  200. package/src/icons/svg/dingzhouqi.svg +34 -34
  201. package/src/icons/svg/ganyingkongzhi.svg +30 -30
  202. package/src/icons/svg/guandeng.svg +81 -81
  203. package/src/icons/svg/huangshan.svg +71 -71
  204. package/src/icons/svg/maincontrol.svg +0 -0
  205. package/src/icons/svg/manualcontrolbackground.svg +51 -51
  206. package/src/icons/svg/manualcontrolbackground1.svg +62 -62
  207. package/src/icons/svg/manualcontrolbackgrounden.svg +62 -62
  208. package/src/icons/svg/model.svg +0 -0
  209. package/src/icons/svg/phasediff.svg +0 -0
  210. package/src/icons/svg/quanhong.svg +86 -86
  211. package/src/icons/svg/shanghe.svg +11 -11
  212. package/src/icons/svg/shoudong.svg +103 -103
  213. package/src/icons/svg/time.svg +0 -0
  214. package/src/icons/svg/wuxianlan.svg +46 -46
  215. package/src/icons/svg/xiala.svg +11 -11
  216. package/src/icons/svg/xingrenguojie.svg +33 -33
  217. package/src/icons/svg/xitong.svg +89 -89
  218. package/src/icons/svg/youxian.svg +41 -41
  219. package/src/icons/svg/zizhukongzhi.svg +43 -43
  220. package/src/kisscomps/components/BoardCard/BoardCard.vue +89 -89
  221. package/src/kisscomps/components/BoardCard/index.js +2 -2
  222. package/src/kisscomps/components/Channelization/Channelization.vue +544 -0
  223. package/src/kisscomps/components/Channelization/index.js +2 -0
  224. package/src/kisscomps/components/ChannelizationWithInterface/ChannelizationWithInterface.vue +498 -0
  225. package/src/kisscomps/components/ChannelizationWithInterface/index.js +2 -0
  226. package/src/kisscomps/components/CommonKanban/CommonKanban.vue +118 -118
  227. package/src/kisscomps/components/CommonKanban/index.js +2 -2
  228. package/src/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +249 -0
  229. package/src/kisscomps/components/DrawChannelization/drawsvg/detectorAssociatedComponent.vue +152 -0
  230. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/TextBox.vue +91 -0
  231. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +176 -0
  232. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/editText.vue +108 -0
  233. package/src/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +48 -0
  234. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +182 -0
  235. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +222 -0
  236. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +191 -0
  237. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +78 -0
  238. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +433 -0
  239. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +195 -0
  240. package/src/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +71 -0
  241. package/src/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +940 -0
  242. package/src/kisscomps/components/DrawChannelization/drawsvg/index.vue +119 -0
  243. package/src/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +563 -0
  244. package/src/kisscomps/components/DrawChannelization/drawsvg/overlapAssociatedComponent.vue +157 -0
  245. package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.check.vue +191 -0
  246. package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.syncOper.vue +331 -0
  247. package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.vue +157 -0
  248. package/src/kisscomps/components/DrawChannelization/drawsvg/table.vue +99 -0
  249. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +43 -0
  250. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/phaseDataModel.js +32 -0
  251. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/phasePos.json +20 -0
  252. package/src/kisscomps/components/DrawChannelization/index.js +2 -0
  253. package/src/kisscomps/components/DrawChannelization/phaseDataMgr.js +278 -0
  254. package/src/kisscomps/components/ExpendConfig/ExpendConfig.vue +114 -114
  255. package/src/kisscomps/components/ExpendConfig/index.js +2 -2
  256. package/src/kisscomps/components/FaultDetailModal/FaultDetailModal.vue +170 -170
  257. package/src/kisscomps/components/FaultDetailModal/index.js +2 -2
  258. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/CrossRoadsSvg.vue +497 -497
  259. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/CustomRoadsSvg.vue +46 -46
  260. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionEWSvg.vue +300 -300
  261. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionSNSvg.vue +288 -288
  262. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampEastSvg.vue +391 -391
  263. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampNorthSvg.vue +336 -336
  264. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampSouthSvg.vue +345 -345
  265. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampWestSvg.vue +389 -389
  266. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkSvg.vue +1179 -1179
  267. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeEastRoadsSvg.vue +402 -402
  268. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeNorthRoadsSvg.vue +361 -361
  269. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeSouthRoadsSvg.vue +368 -368
  270. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeWestRoadsSvg.vue +475 -475
  271. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LCrossRoadsSvg.vue +494 -494
  272. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeEastRoadsSvg.vue +401 -401
  273. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeNorthRoadsSvg.vue +360 -360
  274. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeSouthRoadsSvg.vue +367 -367
  275. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeWestRoadsSvg.vue +476 -476
  276. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/refreshSvg.vue +63 -63
  277. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/busMapSvg.vue +50 -50
  278. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/eastBusSvg.vue +167 -167
  279. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/northBusSvg.vue +168 -168
  280. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/southBusSvg.vue +168 -168
  281. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/westBusSvg.vue +169 -169
  282. package/src/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +912 -912
  283. package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/LphaseIconSvg.vue +112 -112
  284. package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/phaseIconSvg.vue +112 -112
  285. package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/rampPhaseIconSvg.vue +111 -111
  286. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.json +196 -196
  287. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.left.json +196 -196
  288. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.json +99 -99
  289. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.left.json +99 -99
  290. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/rampPos.json +52 -52
  291. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/sidePos.json +99 -99
  292. package/src/kisscomps/components/IntersectionMap/crossDirection/utils.js +78 -78
  293. package/src/kisscomps/components/IntersectionMap/index.js +2 -2
  294. package/src/kisscomps/components/IntersectionMap/intersectionmap.vue +153 -153
  295. package/src/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +518 -518
  296. package/src/kisscomps/components/IntersectionWithInterface/index.js +2 -2
  297. package/src/kisscomps/components/KanBan/index.js +2 -2
  298. package/src/kisscomps/components/KanBan/kanban.vue +219 -219
  299. package/src/kisscomps/components/MessageBox/index.vue +96 -0
  300. package/src/kisscomps/components/OverLap/OverLap.vue +207 -207
  301. package/src/kisscomps/components/OverLap/index.js +2 -2
  302. package/src/kisscomps/components/PatternStatus/PatternStatus.vue +888 -888
  303. package/src/kisscomps/components/PatternStatus/index.js +2 -2
  304. package/src/kisscomps/components/PatternWalkSvg/PatternWalkSvg.vue +423 -423
  305. package/src/kisscomps/components/PatternWalkSvg/index.js +2 -2
  306. package/src/kisscomps/components/PhaseMarker/index.js +6 -6
  307. package/src/kisscomps/components/PhaseMarker/phasemarker.vue +215 -215
  308. package/src/kisscomps/components/PhaseMarker/svg/patternSvg.vue +121 -121
  309. package/src/kisscomps/components/PhaseMarker/svg/phase.vue +60 -60
  310. package/src/kisscomps/components/PhaseMarker/svg/phaseCount.vue +62 -62
  311. package/src/kisscomps/components/PhaseMarker/svg/phaseCountCycle.vue +62 -62
  312. package/src/kisscomps/components/PhaseMarker/svg/phaseSvg.vue +117 -117
  313. package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +744 -744
  314. package/src/kisscomps/components/SchemeConfig/closePhaselControlModal/index.vue +195 -195
  315. package/src/kisscomps/components/SchemeConfig/index.js +2 -2
  316. package/src/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +198 -198
  317. package/src/kisscomps/components/SchemeConfig/manualControlModal/index.vue +219 -219
  318. package/src/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +263 -263
  319. package/src/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +1384 -1384
  320. package/src/kisscomps/components/StageBord/StageBord.vue +242 -242
  321. package/src/kisscomps/components/StageBord/index.js +2 -2
  322. package/src/kisscomps/components/StageStatus/StageStatus.vue +306 -306
  323. package/src/kisscomps/components/StageStatus/index.js +2 -2
  324. package/src/kisscomps/components/Stages/index.vue +139 -139
  325. package/src/kisscomps/components/SvgIcon/SvgIcon.vue +53 -53
  326. package/src/kisscomps/components/SvgIcon/index.js +2 -2
  327. package/src/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +522 -522
  328. package/src/kisscomps/components/XRDDirSelector/index.js +2 -2
  329. package/src/kisscomps/components/overView/index.vue +676 -676
  330. package/src/kisscomps/components/patternList/index.js +2 -2
  331. package/src/kisscomps/components/patternList/patternList.vue +562 -562
  332. package/src/kisscomps/index.js +96 -92
  333. package/src/lib/publicjs/ArryListUtil.js +38 -38
  334. package/src/lib/publicjs/HttpurlMgr.js +45 -45
  335. package/src/lib/publicjs/KissApi.js +158 -158
  336. package/src/lib/publicjs/KissWSSub/Heartcheck.js +128 -128
  337. package/src/lib/publicjs/KissWSSub/KissWsSub.js +91 -91
  338. package/src/lib/publicjs/KissWSSub/KissWsSubByType.js +152 -152
  339. package/src/lib/publicjs/KissWSSub/SimuWsSubByType.js +44 -44
  340. package/src/lib/publicjs/KissWSSub/Sub.js +51 -51
  341. package/src/lib/publicjs/KissWSSub/SubChannel.js +119 -119
  342. package/src/lib/publicjs/basecomponents.js +65 -65
  343. package/src/lib/publicjs/localStorage.js +112 -112
  344. package/src/lib/publicjs/objdeepcopy.js +32 -32
  345. package/src/lib/publicjs/pageScroll.js +30 -30
  346. package/src/lib/publicjs/passwdAssest.js +101 -101
  347. package/src/lib/publicjs/styleclassfactory.js +32 -32
  348. package/src/main.js +50 -47
  349. package/src/router/index.js +43 -36
  350. package/src/store/getters.js +16 -16
  351. package/src/store/index.js +26 -26
  352. package/src/store/modules/globalParam.js +78 -27
  353. package/src/utils/ControlFormat.js +68 -68
  354. package/src/utils/RingDataModel.js +191 -191
  355. package/src/utils/auth.js +111 -111
  356. package/src/utils/dateFormat.js +41 -41
  357. package/src/utils/errorcode.js +224 -224
  358. package/src/utils/fault.js +195 -195
  359. package/src/utils/faultcode.js +209 -209
  360. package/src/utils/index.js +69 -69
  361. package/src/utils/pedphasedesc.js +119 -119
  362. package/src/utils/phasedesc.js +124 -124
  363. package/src/utils/responseMessage.js +21 -21
  364. package/src/utils/validate.js +43 -43
  365. package/src/views/customchannelization.vue +50 -0
  366. package/src/views/home.1.vue +479 -479
  367. package/src/views/home.vue +78 -78
  368. package/src/views/intersection.vue +282 -276
  369. package/src/views/overView.vue +41 -41
  370. package/src/views/schemeconfig.vue +154 -154
  371. package/static/apiconfig.json +351 -336
  372. package/static/styles/channelizatioon.scss +365 -0
  373. package/static/styles/common.scss +20 -19
  374. package/static/styles/commonkanban.scss +87 -87
  375. package/static/styles/dark/index.scss +2 -2
  376. package/static/styles/dark/theme/element-dark.scss +42 -42
  377. package/static/styles/index.scss +84 -84
  378. package/static/styles/intersection.scss +170 -170
  379. package/static/styles/light/index.scss +2 -2
  380. package/static/styles/light/theme/element-light.scss +42 -42
  381. package/static/styles/overview.scss +371 -371
  382. package/static/styles/schemeconfig.scss +405 -405
  383. package/static/styles/stages.scss +64 -64
  384. package/static/token.json +2 -2
  385. package/test/e2e/custom-assertions/elementCount.js +27 -27
  386. package/test/e2e/nightwatch.conf.js +46 -46
  387. package/test/e2e/runner.js +48 -48
  388. package/test/e2e/specs/test.js +19 -19
  389. package/test/unit/.eslintrc +7 -7
  390. package/test/unit/jest.conf.js +30 -30
  391. package/test/unit/setup.js +3 -3
  392. package/test/unit/specs/HelloWorld.spec.js +11 -11
  393. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/PatternWalkSvg.vue +0 -429
@@ -1,744 +1,744 @@
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" @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%;" 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%;" 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
- :controlData="controlData"
65
- :phaseList="phaseList"
66
- :overlap="overlap"
67
- :patternSelect="patternSelect"
68
- :allPatternList="allPatternList"
69
- @closePhaseBack="closePhaseBack"
70
- @closePhaseControl="closePhaseControl"
71
- />
72
- </div>
73
- </transition>
74
-
75
- <transition name="fade-left" mode="out-in"
76
- enter-active-class="animated fadeInLeft"
77
- leave-active-class="animated fadeOutLeft">
78
- <div class="right-control-part" style="position: absolute;width: 100%;" v-show="!isOperation">
79
- <RealtimeStatusModal
80
- :controlData="controlData"
81
- :currModel="currModel"
82
- :ip="ip"
83
- :platform="platform"
84
- :responseTime="responseTime"
85
- :curFaultList="curFaultList"
86
- :confirmedFault="confirmedFault"
87
- :ignoredFault="ignoredFault"
88
- :untreatedFault="untreatedFault"
89
- :closePhase="closePhase"
90
- :agentName="agentName"
91
- :devStatus="devStatus"
92
- :agentId="agentId"
93
- :crossStatusData="crossStatusData"
94
- :phaseList="phaseList"
95
- :sidewalkPhaseData="sidewalkPhaseData"
96
- :roadDirection="roadDirection"
97
- @changeStatus="changeStatus"
98
- @showFaultDetail="showFaultDetail"/>
99
- </div>
100
- </transition>
101
- </div>
102
- </div>
103
- </template>
104
-
105
- <script>
106
- import { putTscControl } from '../../../api/control.js'
107
- import { uploadSingleTscParam } from '../../../api/param.js'
108
- import RealtimeStatusModal from './realtimeStatusModal'
109
- import ManualControlModal from './manualControlModal'
110
- import ClosePhaseControlModal from './closePhaselControlModal'
111
- import LockingPhaseControlModal from './lockingPhaselControlModal'
112
- import TentativePlanControlModal from './tentativeplancontrolmodal'
113
- // import { getFaultMesZh, getFaultMesEn } from '../../utils/faultcode.js'
114
- import { getMessageByCode } from '../../../utils/responseMessage'
115
- import { GetAllFaultRange } from '../../../api/fault'
116
- import PhaseDataModel from '../IntersectionMap/crossDirection/utils.js'
117
- import CrossDiagramMgr from '../../../EdgeMgr/controller/crossDiagramMgr.js'
118
- import { setToken, setHost } from '../../../utils/auth.js'
119
- import RingDataModel from '../../../utils/RingDataModel.js'
120
- import { getIntersectionInfo } from '../../../api/template'
121
- export default {
122
- name: 'scheme-config',
123
- components: {
124
- RealtimeStatusModal,
125
- ManualControlModal,
126
- ClosePhaseControlModal,
127
- LockingPhaseControlModal,
128
- TentativePlanControlModal
129
- },
130
- props: {
131
- phaseList: {
132
- type: Array,
133
- default: () => []
134
- },
135
- reqUrl: {
136
- type: String,
137
- default: ''
138
- },
139
- responseTime: {
140
- type: Number,
141
- default: 0
142
- },
143
- statusData: {
144
- type: Object,
145
- required: true
146
- },
147
- agentName: {
148
- type: String,
149
- default: ''
150
- },
151
- devStatus: {
152
- type: Number,
153
- default: 0
154
- },
155
- agentId: {
156
- type: String,
157
- default: '0'
158
- },
159
- ip: {
160
- type: String
161
- },
162
- // allPatternList: {
163
- // type: Array
164
- // },
165
- // overlap: {
166
- // type: Array
167
- // },
168
- platform: {
169
- type: String
170
- },
171
- realtimeStatusModalvisible: {
172
- type: Boolean,
173
- default: true
174
- },
175
- lockPhaseBtnName: {
176
- type: String
177
- },
178
- Token: {
179
- type: String,
180
- default: ''
181
- },
182
- funcSort: {
183
- type: String,
184
- default: 'allFunc'
185
- },
186
- roadDirection: {
187
- type: String,
188
- default: 'right'
189
- }
190
- },
191
- data () {
192
- return {
193
- crossStatusData: null,
194
- controlData: {},
195
- control: '',
196
- allPatternList: [],
197
- overlap: [],
198
- sidewalkPhaseData: [],
199
- list: [{
200
- iconClass: 'model',
201
- name: '控制模式',
202
- value: '--'
203
- }, {
204
- iconClass: 'cycle',
205
- name: '周期',
206
- value: '--'
207
- }, {
208
- iconClass: 'time',
209
- name: '当前时间',
210
- value: '--'
211
- }, {
212
- iconClass: 'maincontrol',
213
- name: '控制方式',
214
- value: '--'
215
- }, {
216
- iconClass: 'phasediff',
217
- name: '相位差',
218
- value: '--'
219
- }, {
220
- iconClass: 'time',
221
- name: '剩余时间',
222
- value: '--'
223
- }],
224
- faultTimer: null, // 当前故障定时器
225
- ParamsMode: new Map([[0, '自主控制'], [1, '本地手动'], [2, '平台控制'], [3, '配置软件控制'], [4, '遥控器控制'], [5, '黄闪器控制'], [6, '降级控制'], [7, '脚本控制'], [8, '算法控制']]),
226
- 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']]),
227
- 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, '设备维护']]),
228
- 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']]),
229
- phaseType: new Map([[1, '红'], [2, '黄'], [3, '绿']]), // phaseType表示红,黄,绿
230
- phaseTypeEn: new Map([[1, 'Red'], [2, 'Yellow'], [3, 'Green']]), // phaseType表示红,黄,绿
231
- mode: '2',
232
- loading: {},
233
- modelList: [{
234
- id: 1,
235
- iconClass: 'huangshan',
236
- iconName: '黄闪'
237
- }, {
238
- id: 2,
239
- iconClass: 'quanhong',
240
- iconName: '全红'
241
- }, {
242
- id: 3,
243
- iconClass: 'guandeng',
244
- iconName: '关灯'
245
- }, {
246
- id: 4,
247
- iconClass: 'bujin',
248
- iconName: '步进'
249
- }, {
250
- id: 5,
251
- iconClass: 'dingzhouqi',
252
- iconName: '定周期'
253
- }, {
254
- id: 6,
255
- iconClass: 'ganyingkongzhi',
256
- iconName: '感应控制'
257
- }, {
258
- id: 9,
259
- iconClass: 'zishiying',
260
- iconName: '自适应控制'
261
- }, {
262
- id: 10,
263
- iconClass: 'wuxianlan',
264
- iconName: '无电缆协调'
265
- }, {
266
- id: 12,
267
- iconClass: 'xingrenguojie',
268
- iconName: '行人过街'
269
- }, {
270
- id: 19,
271
- iconClass: 'ganyingshixingrenguojie',
272
- iconName: '感应式行人过街控制'
273
- }],
274
- currModel: -1,
275
- preselectModel: -1, // 预选方案
276
- preselectStages: -1, // 预选阶段
277
- closePhase: [],
278
- isOperation: false, // 是否为手动可操作状态
279
- tempPatternid: 0, // 控制方式手动操作的情况下的控制编号的临时值。
280
- tempDelay: 0, // 控制方式手动操作的情况下的延迟时间的临时值。
281
- tempDuration: 0, // 控制方式手动操作的情况下的持续时间的临时值。
282
- // phaseList: [], // 当前相位集合
283
- faultvisible: false,
284
- isClosePhase: false, // 是否在相位关断
285
- toPage: 1, // 与哪一个页面交互,1 代表路口信息页面,3代表 相位关断页面
286
- specialcontrolList: [{ // 特殊控制
287
- id: 23,
288
- iconClass: 'closephase'
289
- }, {
290
- id: 22,
291
- iconClass: 'lockingphase'
292
- }, {
293
- id: 100,
294
- iconClass: 'tentativeplan'
295
- }],
296
- phaseRings: [],
297
- curFaultList: [],
298
- confirmedFault: [],
299
- ignoredFault: [],
300
- untreatedFault: [],
301
- patternAll: [],
302
- patternSelect: [], // 所有方案id
303
- specialPage: '' // 哪一个特殊控制页面
304
- }
305
- },
306
- watch: {
307
- statusData: {
308
- handler: function (val) {
309
- this.initData()
310
- this.getPedPhasePos()
311
- },
312
- // 深度观察监听
313
- deep: true
314
- },
315
- phaseList: {
316
- handler: function (val, oldVal) {
317
- this.getPedPhasePos()
318
- },
319
- // 深度观察监听
320
- deep: true
321
- },
322
- Token: {
323
- handler: function (val) {
324
- this.setPropsToken(val)
325
- }
326
- },
327
- roadDirection: {
328
- handler: function (val) {
329
- if (val === 'left' || val === 'right') {
330
- this.PhaseDataModel = new PhaseDataModel(val)
331
- }
332
- }
333
- }
334
- },
335
- created () {
336
- this.setHost(this.reqUrl)
337
- this.PhaseDataModel = new PhaseDataModel(this.roadDirection)
338
- this.CrossDiagramMgr = new CrossDiagramMgr()
339
- if (this.realtimeStatusModalvisible === false) {
340
- this.changeStatus()
341
- }
342
- this.getIntersectionInfo(this.agentId)
343
- },
344
- async mounted () {
345
- this.setPropsToken(this.Token)
346
- // await this.getPhase()
347
- this.getFault()
348
- this.initData()
349
- },
350
- methods: {
351
- setHost (host) {
352
- // 获取组件外传入的token,便于独立组件调用接口
353
- if (host && host !== '') {
354
- setHost(host)
355
- }
356
- },
357
- getIntersectionInfo (agentid) {
358
- // 获取路口信息
359
- getIntersectionInfo(agentid).then(res => {
360
- this.patternAll = res.data.data.param.patternList
361
- this.allPatternList = res.data.data.param.patternList
362
- this.overlap = res.data.data.param.overlaplList
363
- this.patternSelect = res.data.data.param.patternList.map(item => {
364
- return {
365
- value: item.id,
366
- desc: item.desc ? item.desc : '' + item.id ? item.id : ''
367
- }
368
- })
369
- })
370
- },
371
- getFault () {
372
- this.getFaultById()
373
- this.faultTimer = setInterval(() => {
374
- this.getFaultById()
375
- }, 30000)
376
- },
377
- getPedPhasePos () {
378
- let ringDataModel = new RingDataModel(this.statusData, this.phaseList)
379
- this.sidewalkPhaseData = ringDataModel.getPedPhasePos()
380
- this.ringDataModel = ringDataModel
381
- },
382
- clearFaultInterval () {
383
- if (this.faultTimer !== null) {
384
- clearInterval(this.faultTimer) // 清除流量定时器
385
- this.faultTimer = null
386
- }
387
- },
388
- initData () {
389
- this.crossStatusData = JSON.parse(JSON.stringify(this.statusData))
390
- let TscData = JSON.parse(JSON.stringify(this.crossStatusData))
391
- this.currModel = TscData.control
392
- this.controlData = this.handleGetData(TscData)
393
- this.handleGetPhaseClose()
394
- },
395
- lockScreen () {
396
- this.loading = this.$loading({
397
- lock: true,
398
- text: 'Loading',
399
- spinner: 'el-icon-loading',
400
- background: 'rgba(0, 0, 0, 0.5)'
401
- })
402
- },
403
- unlockScreen () {
404
- this.loading.close()
405
- },
406
- selectModel (value) {
407
- if (!this.isOperation) return
408
- this.preselectStages = -1
409
- this.preselectModel = value
410
- },
411
- selectStages (value) {
412
- if (!this.isOperation) return
413
- if (this.preselectStages !== -1) {
414
- if (this.preselectStages === value) {
415
- this.preselectStages = -1
416
- } else {
417
- this.preselectStages = value
418
- this.preselectModel = 4 // 如果选了阶段,默认控制方式为步进
419
- }
420
- } else {
421
- this.preselectStages = value
422
- this.preselectModel = 4 // 如果选了阶段,默认控制方式为步进
423
- }
424
- },
425
- changeStatus () {
426
- this.toPage = 1
427
- this.isOperation = true
428
- if (this.modelList.filter(ele => ele.id === 0).length === 0) {
429
- let autonomyControl = {
430
- id: 0,
431
- iconClass: 'zizhukongzhi',
432
- iconName: '自主控制'
433
- }
434
- this.modelList.push(autonomyControl)
435
- }
436
- },
437
- handleGetData (data) {
438
- let that = this
439
- if (data.name === '') {
440
- if (that.$i18n.locale === 'en') {
441
- data.name = 'Pattern' + data.patternid
442
- } else if (that.$i18n.locale === 'zh') {
443
- data.name = '方案' + data.patternid
444
- }
445
- }
446
- Object.keys(data).forEach(function (key) {
447
- if (that.$i18n.locale === 'en') {
448
- if (key === 'mode') {
449
- if (data[key] > 0 && data[key] < 6) {
450
- data[key] = that.ParamsModeEn.get(data[key])
451
- } else {
452
- data[key] = that.ParamsModeEn.get(0)
453
- }
454
- }
455
- if (key === 'control') {
456
- data[key] = that.ParamsControlEn.get(data[key])
457
- }
458
- if (key === 'phase') {
459
- for (let val of data[key]) {
460
- val.type = that.phaseTypeEn.get(val.type)
461
- }
462
- }
463
- } else if (that.$i18n.locale === 'zh') {
464
- if (key === 'mode') {
465
- if (data[key] > 0 && data[key] < 6) {
466
- data[key] = that.ParamsMode.get(data[key])
467
- } else {
468
- data[key] = that.ParamsMode.get(0)
469
- }
470
- }
471
- if (key === 'control') {
472
- data[key] = that.ParamsControl.get(data[key])
473
- }
474
- if (key === 'phase') {
475
- for (let val of data[key]) {
476
- val.type = that.phaseType.get(val.type)
477
- }
478
- }
479
- }
480
- })
481
- return data
482
- },
483
- closeManualModal () {
484
- this.isOperation = false
485
- this.preselectModel = -1
486
- this.preselectStages = -1
487
- this.tempPatternid = 0
488
- this.tempDelay = 0
489
- this.tempDuration = 0
490
- this.modelList = this.modelList.filter((item) => {
491
- return item.id !== 0
492
- })
493
- this.toPage = 1
494
- },
495
- handleManualConfirm (manualInfo) {
496
- this.$emit('handleManualConfirm', manualInfo)
497
- },
498
- patternCommit (manualInfo) {
499
- let that = this
500
- let control = {}
501
- that.ParamsMode.forEach(function (value, key, map) {
502
- if (that.controlData.mode === value) {
503
- control.mode = key
504
- }
505
- })
506
- control.control = that.preselectModel === -1 ? that.currModel : that.preselectModel
507
- control.terminal = isNaN(parseInt(manualInfo.tempPatternid)) ? Number(manualInfo.tempPatternid.replace(/[^0-9]/ig, '')) : manualInfo.tempPatternid
508
- control.delay = Number(manualInfo.tempDelay)
509
- control.duration = Number(manualInfo.tempDuration)
510
- control.value = that.preselectStages === -1 ? 0 : that.preselectStages
511
- if (control.control === 0) {
512
- // 恢复自主控制(多时段)时,value为当前控制方式
513
- control.value = this.currModel
514
- }
515
- if (!this.realtimeStatusModalvisible) {
516
- console.log(control)
517
- this.$emit('patternCommitCallback', control)
518
- return
519
- }
520
- this.lockScreen()
521
- putTscControl(control).then(data => {
522
- that.unlockScreen()
523
- let success = 0
524
- if (!data.data.success) {
525
- that.$message.error(getMessageByCode(data.data.code, that.$i18n.locale))
526
- return
527
- }
528
- if (data.data.data && data.data.data.data) {
529
- success = data.data.data.data.success
530
- if (success !== 0) {
531
- let errormsg = 'openatccomponents.overview.putTscControlError' + success
532
- that.$message.error(this.$t(errormsg))
533
- return
534
- }
535
- }
536
- // this.closeManualModal()
537
- if ((that.currModel === 5 || that.currModel === 6 || that.currModel === 10 || that.currModel === 12) && (that.preselectModel === 6 || that.preselectModel === 10 || that.preselectModel === 12)) {
538
- that.$message.success(this.$t('openatccomponents.overview.nextcycleeffic'))
539
- return
540
- }
541
- if (that.preselectModel === 4) {
542
- that.$message.success(this.$t('openatccomponents.overview.transitioneffic'))
543
- return
544
- }
545
- if (success === 0) {
546
- that.$message.success(this.$t('openatccomponents.common.download'))
547
- }
548
- }).catch(error => {
549
- that.unlockScreen()
550
- console.log(error)
551
- })
552
- },
553
- getPhase () {
554
- let _this = this
555
- return new Promise(function (resolve, reject) {
556
- uploadSingleTscParam('phase', _this.agentId).then(data => {
557
- let res = data.data
558
- if (!res.success) {
559
- if (res.code === '4003') {
560
- _this.$message.error(_this.$t('openatccomponents.errorTip.devicenotonline'))
561
- return
562
- }
563
- _this.$message.error(getMessageByCode(data.data.code, _this.$i18n.locale))
564
- return
565
- }
566
- _this.phaseList = res.data.data.phaseList
567
- resolve()
568
- })
569
- })
570
- },
571
- handleFaultsVisible () {
572
- this.faultvisible = !this.faultvisible
573
- },
574
- handleGetPhaseClose () {
575
- if (this.crossStatusData.phase) {
576
- this.crossStatusData.phase = this.crossStatusData.phase.map(ele => {
577
- return {
578
- ...ele,
579
- close: ele.close || 0,
580
- locktype: 0 // 默认所有相位显示解锁状态
581
- }
582
- })
583
- // 相位关断标签
584
- let closePhase = []
585
- this.crossStatusData.phase.forEach(phase => {
586
- if (phase.close !== undefined && phase.close !== 0) {
587
- let typename
588
- switch (phase.close) {
589
- case 1: typename = ''
590
- break
591
- case 2: typename = this.$t('openatccomponents.overview.vehicle')
592
- break
593
- case 3: typename = this.$t('openatccomponents.overview.pedestrian')
594
- break
595
- default:typename = ''
596
- }
597
- closePhase.push({
598
- id: phase.id,
599
- typename: typename
600
- })
601
- }
602
- })
603
- this.closePhase = JSON.parse(JSON.stringify(closePhase))
604
- }
605
- },
606
- selectSpecialModel (id) {
607
- let ringDataModel = new RingDataModel(this.statusData, this.phaseList)
608
- if (id === 23) {
609
- this.toPage = 3
610
- this.isClosePhase = true
611
- this.phaseRings = ringDataModel.initRingPhaseData()
612
- this.specialPage = 'closephase'
613
- } else if (id === 22) {
614
- this.toPage = 3
615
- this.isClosePhase = true
616
- this.phaseRings = ringDataModel.initRingPhaseData()
617
- this.specialPage = 'lockingphase'
618
- } else if (id === 100) {
619
- this.toPage = 3
620
- this.isClosePhase = true
621
- this.phaseRings = ringDataModel.initRingPhaseData()
622
- this.specialPage = 'tentativeplan'
623
- } else {
624
- this.isClosePhase = false
625
- this.specialPage = ''
626
- }
627
- },
628
- closePhaseBack () {
629
- // if (!this.realtimeStatusModalvisible) {
630
- // this.$emit('closePhaseBack')
631
- // return
632
- // }
633
- this.toPage = 3
634
- this.isClosePhase = false
635
- },
636
- closePhaseControl (controldata) {
637
- if (!this.realtimeStatusModalvisible) {
638
- this.$emit('patternCommitCallback', controldata)
639
- return
640
- }
641
- this.lockScreen()
642
- putTscControl(controldata).then(data => {
643
- this.unlockScreen()
644
- let success = 0
645
- if (!data.data.success) {
646
- this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
647
- return
648
- }
649
- if (data.data.data && data.data.data.data) {
650
- success = data.data.data.data.success
651
- if (success !== 0) {
652
- let errormsg = 'openatccomponents.overview.putTscControlError' + success
653
- this.$message.error(this.$t(errormsg))
654
- return
655
- }
656
- }
657
- this.$alert(this.$t('openatccomponents.common.download'), { type: 'success' })
658
- }).catch(error => {
659
- this.unlockScreen()
660
- console.log(error)
661
- })
662
- },
663
- // initRingPhaseData () {
664
- // // 环信息从单独上载相位信息里获取,以免相位锁定后,方案状态数据里没有rings,导致相位锁定控制列表无法显示
665
- // this.phaseRings = []
666
- // let map = {}
667
- // let dest = []
668
- // for (let i = 0; i < this.phaseList.length; i++) {
669
- // let ai = this.phaseList[i]
670
- // if (!map[ai.ring]) {
671
- // let addphse = this.addPhaseInfo(ai)
672
- // dest.push({
673
- // num: ai.ring,
674
- // phases: [{...ai, ...addphse}]
675
- // })
676
- // map[ai.ring] = ai
677
- // } else {
678
- // for (var j = 0; j < dest.length; j++) {
679
- // var dj = dest[j]
680
- // if (dj.num === ai.ring) {
681
- // let addphse = this.addPhaseInfo(ai)
682
- // dj.phases.push({...ai, ...addphse})
683
- // break
684
- // }
685
- // }
686
- // }
687
- // }
688
- // this.phaseRings = JSON.parse(JSON.stringify(dest))
689
- // },
690
- // addPhaseInfo (phase) {
691
- // let addphse = {}
692
- // addphse.name = this.$t('openatccomponents.overview.phase') + phase.id
693
- // addphse.desc = this.getPhaseDescription(phase.direction)
694
- // // 相位锁定选项默认都按照解锁状态显示
695
- // addphse.locktype = 0
696
- // addphse.close = 0
697
- // if (this.crossStatusData !== null && this.crossStatusData.phase) {
698
- // // 如果方案状态相位有close字段,这边就需要对应close状态进相位关断控制的选项里
699
- // let phaseStatus = this.crossStatusData.phase.filter(ele => ele.id === phase.id)[0]
700
- // addphse = {...addphse, ...phaseStatus}
701
- // }
702
- // return addphse
703
- // },
704
- // getPhaseDescription (phaseList) {
705
- // let list = []
706
- // for (let id of phaseList) {
707
- // let obj = {}
708
- // obj.id = id
709
- // obj.color = '#454545'
710
- // list.push(obj)
711
- // }
712
- // return list
713
- // },
714
- getFaultById () {
715
- let param = {
716
- agentId: this.agentId,
717
- isCurrentFault: true
718
- }
719
- GetAllFaultRange(param).then(res => {
720
- if (res.data.success !== true) {
721
- this.$message.error(getMessageByCode(res.data.code, this.$i18n.locale))
722
- return
723
- }
724
- this.curFaultList = res.data.data.content
725
- this.confirmedFault = this.curFaultList.filter(ele => ele.enumerate === '2')
726
- this.ignoredFault = this.curFaultList.filter(ele => ele.enumerate === '1')
727
- this.untreatedFault = this.curFaultList.filter(ele => ele.enumerate === '0')
728
- })
729
- },
730
- showFaultDetail () {
731
- this.$refs.faultDetail.onViewFaultClick()
732
- },
733
- setPropsToken (token) {
734
- // 获取组件外传入的token,便于独立组件调用接口
735
- if (token && token !== '') {
736
- setToken(token)
737
- }
738
- }
739
- },
740
- destroyed () {
741
- this.clearFaultInterval()
742
- }
743
- }
744
- </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" @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%;" 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%;" 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
+ :controlData="controlData"
65
+ :phaseList="phaseList"
66
+ :overlap="overlap"
67
+ :patternSelect="patternSelect"
68
+ :allPatternList="allPatternList"
69
+ @closePhaseBack="closePhaseBack"
70
+ @closePhaseControl="closePhaseControl"
71
+ />
72
+ </div>
73
+ </transition>
74
+
75
+ <transition name="fade-left" mode="out-in"
76
+ enter-active-class="animated fadeInLeft"
77
+ leave-active-class="animated fadeOutLeft">
78
+ <div class="right-control-part" style="position: absolute;width: 100%;" v-show="!isOperation">
79
+ <RealtimeStatusModal
80
+ :controlData="controlData"
81
+ :currModel="currModel"
82
+ :ip="ip"
83
+ :platform="platform"
84
+ :responseTime="responseTime"
85
+ :curFaultList="curFaultList"
86
+ :confirmedFault="confirmedFault"
87
+ :ignoredFault="ignoredFault"
88
+ :untreatedFault="untreatedFault"
89
+ :closePhase="closePhase"
90
+ :agentName="agentName"
91
+ :devStatus="devStatus"
92
+ :agentId="agentId"
93
+ :crossStatusData="crossStatusData"
94
+ :phaseList="phaseList"
95
+ :sidewalkPhaseData="sidewalkPhaseData"
96
+ :roadDirection="roadDirection"
97
+ @changeStatus="changeStatus"
98
+ @showFaultDetail="showFaultDetail"/>
99
+ </div>
100
+ </transition>
101
+ </div>
102
+ </div>
103
+ </template>
104
+
105
+ <script>
106
+ import { putTscControl } from '../../../api/control.js'
107
+ import { uploadSingleTscParam } from '../../../api/param.js'
108
+ import RealtimeStatusModal from './realtimeStatusModal'
109
+ import ManualControlModal from './manualControlModal'
110
+ import ClosePhaseControlModal from './closePhaselControlModal'
111
+ import LockingPhaseControlModal from './lockingPhaselControlModal'
112
+ import TentativePlanControlModal from './tentativeplancontrolmodal'
113
+ // import { getFaultMesZh, getFaultMesEn } from '../../utils/faultcode.js'
114
+ import { getMessageByCode } from '../../../utils/responseMessage'
115
+ import { GetAllFaultRange } from '../../../api/fault'
116
+ import PhaseDataModel from '../IntersectionMap/crossDirection/utils.js'
117
+ import CrossDiagramMgr from '../../../EdgeMgr/controller/crossDiagramMgr.js'
118
+ import { setToken, setHost } from '../../../utils/auth.js'
119
+ import RingDataModel from '../../../utils/RingDataModel.js'
120
+ import { getIntersectionInfo } from '../../../api/template'
121
+ export default {
122
+ name: 'scheme-config',
123
+ components: {
124
+ RealtimeStatusModal,
125
+ ManualControlModal,
126
+ ClosePhaseControlModal,
127
+ LockingPhaseControlModal,
128
+ TentativePlanControlModal
129
+ },
130
+ props: {
131
+ phaseList: {
132
+ type: Array,
133
+ default: () => []
134
+ },
135
+ reqUrl: {
136
+ type: String,
137
+ default: ''
138
+ },
139
+ responseTime: {
140
+ type: Number,
141
+ default: 0
142
+ },
143
+ statusData: {
144
+ type: Object,
145
+ required: true
146
+ },
147
+ agentName: {
148
+ type: String,
149
+ default: ''
150
+ },
151
+ devStatus: {
152
+ type: Number,
153
+ default: 0
154
+ },
155
+ agentId: {
156
+ type: String,
157
+ default: '0'
158
+ },
159
+ ip: {
160
+ type: String
161
+ },
162
+ // allPatternList: {
163
+ // type: Array
164
+ // },
165
+ // overlap: {
166
+ // type: Array
167
+ // },
168
+ platform: {
169
+ type: String
170
+ },
171
+ realtimeStatusModalvisible: {
172
+ type: Boolean,
173
+ default: true
174
+ },
175
+ lockPhaseBtnName: {
176
+ type: String
177
+ },
178
+ Token: {
179
+ type: String,
180
+ default: ''
181
+ },
182
+ funcSort: {
183
+ type: String,
184
+ default: 'allFunc'
185
+ },
186
+ roadDirection: {
187
+ type: String,
188
+ default: 'right'
189
+ }
190
+ },
191
+ data () {
192
+ return {
193
+ crossStatusData: null,
194
+ controlData: {},
195
+ control: '',
196
+ allPatternList: [],
197
+ overlap: [],
198
+ sidewalkPhaseData: [],
199
+ list: [{
200
+ iconClass: 'model',
201
+ name: '控制模式',
202
+ value: '--'
203
+ }, {
204
+ iconClass: 'cycle',
205
+ name: '周期',
206
+ value: '--'
207
+ }, {
208
+ iconClass: 'time',
209
+ name: '当前时间',
210
+ value: '--'
211
+ }, {
212
+ iconClass: 'maincontrol',
213
+ name: '控制方式',
214
+ value: '--'
215
+ }, {
216
+ iconClass: 'phasediff',
217
+ name: '相位差',
218
+ value: '--'
219
+ }, {
220
+ iconClass: 'time',
221
+ name: '剩余时间',
222
+ value: '--'
223
+ }],
224
+ faultTimer: null, // 当前故障定时器
225
+ ParamsMode: new Map([[0, '自主控制'], [1, '本地手动'], [2, '平台控制'], [3, '配置软件控制'], [4, '遥控器控制'], [5, '黄闪器控制'], [6, '降级控制'], [7, '脚本控制'], [8, '算法控制']]),
226
+ 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']]),
227
+ 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, '设备维护']]),
228
+ 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']]),
229
+ phaseType: new Map([[1, '红'], [2, '黄'], [3, '绿']]), // phaseType表示红,黄,绿
230
+ phaseTypeEn: new Map([[1, 'Red'], [2, 'Yellow'], [3, 'Green']]), // phaseType表示红,黄,绿
231
+ mode: '2',
232
+ loading: {},
233
+ modelList: [{
234
+ id: 1,
235
+ iconClass: 'huangshan',
236
+ iconName: '黄闪'
237
+ }, {
238
+ id: 2,
239
+ iconClass: 'quanhong',
240
+ iconName: '全红'
241
+ }, {
242
+ id: 3,
243
+ iconClass: 'guandeng',
244
+ iconName: '关灯'
245
+ }, {
246
+ id: 4,
247
+ iconClass: 'bujin',
248
+ iconName: '步进'
249
+ }, {
250
+ id: 5,
251
+ iconClass: 'dingzhouqi',
252
+ iconName: '定周期'
253
+ }, {
254
+ id: 6,
255
+ iconClass: 'ganyingkongzhi',
256
+ iconName: '感应控制'
257
+ }, {
258
+ id: 9,
259
+ iconClass: 'zishiying',
260
+ iconName: '自适应控制'
261
+ }, {
262
+ id: 10,
263
+ iconClass: 'wuxianlan',
264
+ iconName: '无电缆协调'
265
+ }, {
266
+ id: 12,
267
+ iconClass: 'xingrenguojie',
268
+ iconName: '行人过街'
269
+ }, {
270
+ id: 19,
271
+ iconClass: 'ganyingshixingrenguojie',
272
+ iconName: '感应式行人过街控制'
273
+ }],
274
+ currModel: -1,
275
+ preselectModel: -1, // 预选方案
276
+ preselectStages: -1, // 预选阶段
277
+ closePhase: [],
278
+ isOperation: false, // 是否为手动可操作状态
279
+ tempPatternid: 0, // 控制方式手动操作的情况下的控制编号的临时值。
280
+ tempDelay: 0, // 控制方式手动操作的情况下的延迟时间的临时值。
281
+ tempDuration: 0, // 控制方式手动操作的情况下的持续时间的临时值。
282
+ // phaseList: [], // 当前相位集合
283
+ faultvisible: false,
284
+ isClosePhase: false, // 是否在相位关断
285
+ toPage: 1, // 与哪一个页面交互,1 代表路口信息页面,3代表 相位关断页面
286
+ specialcontrolList: [{ // 特殊控制
287
+ id: 23,
288
+ iconClass: 'closephase'
289
+ }, {
290
+ id: 22,
291
+ iconClass: 'lockingphase'
292
+ }, {
293
+ id: 100,
294
+ iconClass: 'tentativeplan'
295
+ }],
296
+ phaseRings: [],
297
+ curFaultList: [],
298
+ confirmedFault: [],
299
+ ignoredFault: [],
300
+ untreatedFault: [],
301
+ patternAll: [],
302
+ patternSelect: [], // 所有方案id
303
+ specialPage: '' // 哪一个特殊控制页面
304
+ }
305
+ },
306
+ watch: {
307
+ statusData: {
308
+ handler: function (val) {
309
+ this.initData()
310
+ this.getPedPhasePos()
311
+ },
312
+ // 深度观察监听
313
+ deep: true
314
+ },
315
+ phaseList: {
316
+ handler: function (val, oldVal) {
317
+ this.getPedPhasePos()
318
+ },
319
+ // 深度观察监听
320
+ deep: true
321
+ },
322
+ Token: {
323
+ handler: function (val) {
324
+ this.setPropsToken(val)
325
+ }
326
+ },
327
+ roadDirection: {
328
+ handler: function (val) {
329
+ if (val === 'left' || val === 'right') {
330
+ this.PhaseDataModel = new PhaseDataModel(val)
331
+ }
332
+ }
333
+ }
334
+ },
335
+ created () {
336
+ this.setHost(this.reqUrl)
337
+ this.PhaseDataModel = new PhaseDataModel(this.roadDirection)
338
+ this.CrossDiagramMgr = new CrossDiagramMgr()
339
+ if (this.realtimeStatusModalvisible === false) {
340
+ this.changeStatus()
341
+ }
342
+ this.getIntersectionInfo(this.agentId)
343
+ },
344
+ async mounted () {
345
+ this.setPropsToken(this.Token)
346
+ // await this.getPhase()
347
+ this.getFault()
348
+ this.initData()
349
+ },
350
+ methods: {
351
+ setHost (host) {
352
+ // 获取组件外传入的token,便于独立组件调用接口
353
+ if (host && host !== '') {
354
+ setHost(host)
355
+ }
356
+ },
357
+ getIntersectionInfo (agentid) {
358
+ // 获取路口信息
359
+ getIntersectionInfo(agentid).then(res => {
360
+ this.patternAll = res.data.data.param.patternList
361
+ this.allPatternList = res.data.data.param.patternList
362
+ this.overlap = res.data.data.param.overlaplList
363
+ this.patternSelect = res.data.data.param.patternList.map(item => {
364
+ return {
365
+ value: item.id,
366
+ desc: item.desc ? item.desc : '' + item.id ? item.id : ''
367
+ }
368
+ })
369
+ })
370
+ },
371
+ getFault () {
372
+ this.getFaultById()
373
+ this.faultTimer = setInterval(() => {
374
+ this.getFaultById()
375
+ }, 30000)
376
+ },
377
+ getPedPhasePos () {
378
+ let ringDataModel = new RingDataModel(this.statusData, this.phaseList)
379
+ this.sidewalkPhaseData = ringDataModel.getPedPhasePos()
380
+ this.ringDataModel = ringDataModel
381
+ },
382
+ clearFaultInterval () {
383
+ if (this.faultTimer !== null) {
384
+ clearInterval(this.faultTimer) // 清除流量定时器
385
+ this.faultTimer = null
386
+ }
387
+ },
388
+ initData () {
389
+ this.crossStatusData = JSON.parse(JSON.stringify(this.statusData))
390
+ let TscData = JSON.parse(JSON.stringify(this.crossStatusData))
391
+ this.currModel = TscData.control
392
+ this.controlData = this.handleGetData(TscData)
393
+ this.handleGetPhaseClose()
394
+ },
395
+ lockScreen () {
396
+ this.loading = this.$loading({
397
+ lock: true,
398
+ text: 'Loading',
399
+ spinner: 'el-icon-loading',
400
+ background: 'rgba(0, 0, 0, 0.5)'
401
+ })
402
+ },
403
+ unlockScreen () {
404
+ this.loading.close()
405
+ },
406
+ selectModel (value) {
407
+ if (!this.isOperation) return
408
+ this.preselectStages = -1
409
+ this.preselectModel = value
410
+ },
411
+ selectStages (value) {
412
+ if (!this.isOperation) return
413
+ if (this.preselectStages !== -1) {
414
+ if (this.preselectStages === value) {
415
+ this.preselectStages = -1
416
+ } else {
417
+ this.preselectStages = value
418
+ this.preselectModel = 4 // 如果选了阶段,默认控制方式为步进
419
+ }
420
+ } else {
421
+ this.preselectStages = value
422
+ this.preselectModel = 4 // 如果选了阶段,默认控制方式为步进
423
+ }
424
+ },
425
+ changeStatus () {
426
+ this.toPage = 1
427
+ this.isOperation = true
428
+ if (this.modelList.filter(ele => ele.id === 0).length === 0) {
429
+ let autonomyControl = {
430
+ id: 0,
431
+ iconClass: 'zizhukongzhi',
432
+ iconName: '自主控制'
433
+ }
434
+ this.modelList.push(autonomyControl)
435
+ }
436
+ },
437
+ handleGetData (data) {
438
+ let that = this
439
+ if (data.name === '') {
440
+ if (that.$i18n.locale === 'en') {
441
+ data.name = 'Pattern' + data.patternid
442
+ } else if (that.$i18n.locale === 'zh') {
443
+ data.name = '方案' + data.patternid
444
+ }
445
+ }
446
+ Object.keys(data).forEach(function (key) {
447
+ if (that.$i18n.locale === 'en') {
448
+ if (key === 'mode') {
449
+ if (data[key] > 0 && data[key] < 6) {
450
+ data[key] = that.ParamsModeEn.get(data[key])
451
+ } else {
452
+ data[key] = that.ParamsModeEn.get(0)
453
+ }
454
+ }
455
+ if (key === 'control') {
456
+ data[key] = that.ParamsControlEn.get(data[key])
457
+ }
458
+ if (key === 'phase') {
459
+ for (let val of data[key]) {
460
+ val.type = that.phaseTypeEn.get(val.type)
461
+ }
462
+ }
463
+ } else if (that.$i18n.locale === 'zh') {
464
+ if (key === 'mode') {
465
+ if (data[key] > 0 && data[key] < 6) {
466
+ data[key] = that.ParamsMode.get(data[key])
467
+ } else {
468
+ data[key] = that.ParamsMode.get(0)
469
+ }
470
+ }
471
+ if (key === 'control') {
472
+ data[key] = that.ParamsControl.get(data[key])
473
+ }
474
+ if (key === 'phase') {
475
+ for (let val of data[key]) {
476
+ val.type = that.phaseType.get(val.type)
477
+ }
478
+ }
479
+ }
480
+ })
481
+ return data
482
+ },
483
+ closeManualModal () {
484
+ this.isOperation = false
485
+ this.preselectModel = -1
486
+ this.preselectStages = -1
487
+ this.tempPatternid = 0
488
+ this.tempDelay = 0
489
+ this.tempDuration = 0
490
+ this.modelList = this.modelList.filter((item) => {
491
+ return item.id !== 0
492
+ })
493
+ this.toPage = 1
494
+ },
495
+ handleManualConfirm (manualInfo) {
496
+ this.$emit('handleManualConfirm', manualInfo)
497
+ },
498
+ patternCommit (manualInfo) {
499
+ let that = this
500
+ let control = {}
501
+ that.ParamsMode.forEach(function (value, key, map) {
502
+ if (that.controlData.mode === value) {
503
+ control.mode = key
504
+ }
505
+ })
506
+ control.control = that.preselectModel === -1 ? that.currModel : that.preselectModel
507
+ control.terminal = isNaN(parseInt(manualInfo.tempPatternid)) ? Number(manualInfo.tempPatternid.replace(/[^0-9]/ig, '')) : manualInfo.tempPatternid
508
+ control.delay = Number(manualInfo.tempDelay)
509
+ control.duration = Number(manualInfo.tempDuration)
510
+ control.value = that.preselectStages === -1 ? 0 : that.preselectStages
511
+ if (control.control === 0) {
512
+ // 恢复自主控制(多时段)时,value为当前控制方式
513
+ control.value = this.currModel
514
+ }
515
+ if (!this.realtimeStatusModalvisible) {
516
+ console.log(control)
517
+ this.$emit('patternCommitCallback', control)
518
+ return
519
+ }
520
+ this.lockScreen()
521
+ putTscControl(control).then(data => {
522
+ that.unlockScreen()
523
+ let success = 0
524
+ if (!data.data.success) {
525
+ that.$message.error(getMessageByCode(data.data.code, that.$i18n.locale))
526
+ return
527
+ }
528
+ if (data.data.data && data.data.data.data) {
529
+ success = data.data.data.data.success
530
+ if (success !== 0) {
531
+ let errormsg = 'openatccomponents.overview.putTscControlError' + success
532
+ that.$message.error(this.$t(errormsg))
533
+ return
534
+ }
535
+ }
536
+ // this.closeManualModal()
537
+ if ((that.currModel === 5 || that.currModel === 6 || that.currModel === 10 || that.currModel === 12) && (that.preselectModel === 6 || that.preselectModel === 10 || that.preselectModel === 12)) {
538
+ that.$message.success(this.$t('openatccomponents.overview.nextcycleeffic'))
539
+ return
540
+ }
541
+ if (that.preselectModel === 4) {
542
+ that.$message.success(this.$t('openatccomponents.overview.transitioneffic'))
543
+ return
544
+ }
545
+ if (success === 0) {
546
+ that.$message.success(this.$t('openatccomponents.common.download'))
547
+ }
548
+ }).catch(error => {
549
+ that.unlockScreen()
550
+ console.log(error)
551
+ })
552
+ },
553
+ getPhase () {
554
+ let _this = this
555
+ return new Promise(function (resolve, reject) {
556
+ uploadSingleTscParam('phase', _this.agentId).then(data => {
557
+ let res = data.data
558
+ if (!res.success) {
559
+ if (res.code === '4003') {
560
+ _this.$message.error(_this.$t('openatccomponents.errorTip.devicenotonline'))
561
+ return
562
+ }
563
+ _this.$message.error(getMessageByCode(data.data.code, _this.$i18n.locale))
564
+ return
565
+ }
566
+ _this.phaseList = res.data.data.phaseList
567
+ resolve()
568
+ })
569
+ })
570
+ },
571
+ handleFaultsVisible () {
572
+ this.faultvisible = !this.faultvisible
573
+ },
574
+ handleGetPhaseClose () {
575
+ if (this.crossStatusData.phase) {
576
+ this.crossStatusData.phase = this.crossStatusData.phase.map(ele => {
577
+ return {
578
+ ...ele,
579
+ close: ele.close || 0,
580
+ locktype: 0 // 默认所有相位显示解锁状态
581
+ }
582
+ })
583
+ // 相位关断标签
584
+ let closePhase = []
585
+ this.crossStatusData.phase.forEach(phase => {
586
+ if (phase.close !== undefined && phase.close !== 0) {
587
+ let typename
588
+ switch (phase.close) {
589
+ case 1: typename = ''
590
+ break
591
+ case 2: typename = this.$t('openatccomponents.overview.vehicle')
592
+ break
593
+ case 3: typename = this.$t('openatccomponents.overview.pedestrian')
594
+ break
595
+ default:typename = ''
596
+ }
597
+ closePhase.push({
598
+ id: phase.id,
599
+ typename: typename
600
+ })
601
+ }
602
+ })
603
+ this.closePhase = JSON.parse(JSON.stringify(closePhase))
604
+ }
605
+ },
606
+ selectSpecialModel (id) {
607
+ let ringDataModel = new RingDataModel(this.statusData, this.phaseList)
608
+ if (id === 23) {
609
+ this.toPage = 3
610
+ this.isClosePhase = true
611
+ this.phaseRings = ringDataModel.initRingPhaseData()
612
+ this.specialPage = 'closephase'
613
+ } else if (id === 22) {
614
+ this.toPage = 3
615
+ this.isClosePhase = true
616
+ this.phaseRings = ringDataModel.initRingPhaseData()
617
+ this.specialPage = 'lockingphase'
618
+ } else if (id === 100) {
619
+ this.toPage = 3
620
+ this.isClosePhase = true
621
+ this.phaseRings = ringDataModel.initRingPhaseData()
622
+ this.specialPage = 'tentativeplan'
623
+ } else {
624
+ this.isClosePhase = false
625
+ this.specialPage = ''
626
+ }
627
+ },
628
+ closePhaseBack () {
629
+ // if (!this.realtimeStatusModalvisible) {
630
+ // this.$emit('closePhaseBack')
631
+ // return
632
+ // }
633
+ this.toPage = 3
634
+ this.isClosePhase = false
635
+ },
636
+ closePhaseControl (controldata) {
637
+ if (!this.realtimeStatusModalvisible) {
638
+ this.$emit('patternCommitCallback', controldata)
639
+ return
640
+ }
641
+ this.lockScreen()
642
+ putTscControl(controldata).then(data => {
643
+ this.unlockScreen()
644
+ let success = 0
645
+ if (!data.data.success) {
646
+ this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
647
+ return
648
+ }
649
+ if (data.data.data && data.data.data.data) {
650
+ success = data.data.data.data.success
651
+ if (success !== 0) {
652
+ let errormsg = 'openatccomponents.overview.putTscControlError' + success
653
+ this.$message.error(this.$t(errormsg))
654
+ return
655
+ }
656
+ }
657
+ this.$alert(this.$t('openatccomponents.common.download'), { type: 'success' })
658
+ }).catch(error => {
659
+ this.unlockScreen()
660
+ console.log(error)
661
+ })
662
+ },
663
+ // initRingPhaseData () {
664
+ // // 环信息从单独上载相位信息里获取,以免相位锁定后,方案状态数据里没有rings,导致相位锁定控制列表无法显示
665
+ // this.phaseRings = []
666
+ // let map = {}
667
+ // let dest = []
668
+ // for (let i = 0; i < this.phaseList.length; i++) {
669
+ // let ai = this.phaseList[i]
670
+ // if (!map[ai.ring]) {
671
+ // let addphse = this.addPhaseInfo(ai)
672
+ // dest.push({
673
+ // num: ai.ring,
674
+ // phases: [{...ai, ...addphse}]
675
+ // })
676
+ // map[ai.ring] = ai
677
+ // } else {
678
+ // for (var j = 0; j < dest.length; j++) {
679
+ // var dj = dest[j]
680
+ // if (dj.num === ai.ring) {
681
+ // let addphse = this.addPhaseInfo(ai)
682
+ // dj.phases.push({...ai, ...addphse})
683
+ // break
684
+ // }
685
+ // }
686
+ // }
687
+ // }
688
+ // this.phaseRings = JSON.parse(JSON.stringify(dest))
689
+ // },
690
+ // addPhaseInfo (phase) {
691
+ // let addphse = {}
692
+ // addphse.name = this.$t('openatccomponents.overview.phase') + phase.id
693
+ // addphse.desc = this.getPhaseDescription(phase.direction)
694
+ // // 相位锁定选项默认都按照解锁状态显示
695
+ // addphse.locktype = 0
696
+ // addphse.close = 0
697
+ // if (this.crossStatusData !== null && this.crossStatusData.phase) {
698
+ // // 如果方案状态相位有close字段,这边就需要对应close状态进相位关断控制的选项里
699
+ // let phaseStatus = this.crossStatusData.phase.filter(ele => ele.id === phase.id)[0]
700
+ // addphse = {...addphse, ...phaseStatus}
701
+ // }
702
+ // return addphse
703
+ // },
704
+ // getPhaseDescription (phaseList) {
705
+ // let list = []
706
+ // for (let id of phaseList) {
707
+ // let obj = {}
708
+ // obj.id = id
709
+ // obj.color = '#454545'
710
+ // list.push(obj)
711
+ // }
712
+ // return list
713
+ // },
714
+ getFaultById () {
715
+ let param = {
716
+ agentId: this.agentId,
717
+ isCurrentFault: true
718
+ }
719
+ GetAllFaultRange(param).then(res => {
720
+ if (res.data.success !== true) {
721
+ this.$message.error(getMessageByCode(res.data.code, this.$i18n.locale))
722
+ return
723
+ }
724
+ this.curFaultList = res.data.data.content
725
+ this.confirmedFault = this.curFaultList.filter(ele => ele.enumerate === '2')
726
+ this.ignoredFault = this.curFaultList.filter(ele => ele.enumerate === '1')
727
+ this.untreatedFault = this.curFaultList.filter(ele => ele.enumerate === '0')
728
+ })
729
+ },
730
+ showFaultDetail () {
731
+ this.$refs.faultDetail.onViewFaultClick()
732
+ },
733
+ setPropsToken (token) {
734
+ // 获取组件外传入的token,便于独立组件调用接口
735
+ if (token && token !== '') {
736
+ setToken(token)
737
+ }
738
+ }
739
+ },
740
+ destroyed () {
741
+ this.clearFaultInterval()
742
+ }
743
+ }
744
+ </script>