openatc-components 0.0.88 → 0.0.91

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 +91 -91
  19. package/config/prod.env.js +5 -5
  20. package/config/test.env.js +7 -7
  21. package/index.html +12 -12
  22. package/package/kisscomps/components/BoardCard/BoardCard.vue +89 -89
  23. package/package/kisscomps/components/BoardCard/index.js +2 -2
  24. package/package/kisscomps/components/Channelization/Channelization.vue +545 -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 +939 -0
  44. package/package/kisscomps/components/DrawChannelization/drawsvg/index.vue +118 -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 +102 -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 +545 -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 +939 -0
  242. package/src/kisscomps/components/DrawChannelization/drawsvg/index.vue +118 -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 +102 -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 +49 -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
@@ -0,0 +1,939 @@
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="custom-cross" v-if="visible">
14
+ <ImportDialog ref="importDialog" @loadSvgString="loadSvgString"/>
15
+ <Messagebox :visible="canclesettingvisible" :text="$t('openatccomponents.channelizationmap.canclesetting')" @cancle="cancleSetting" @ok="completeSetting"/>
16
+ <div class="custom-main" ref="custommain">
17
+ <div class="custom-group drawPanelAnimation" ref="customGroup">
18
+ <!-- 绘制功能 -->
19
+ <div class="draw-function">
20
+ <div class="again-import">
21
+ <span class="import-label">{{$t('openatccomponents.channelizationmap.importcrosspicture')}}</span>
22
+ <el-button
23
+ class="again-import-btn"
24
+ type="primary"
25
+ :disabled="!isSeletable"
26
+ @click="clickOpen"
27
+ >{{$t('openatccomponents.channelizationmap.againimport')}}</el-button>
28
+ </div>
29
+
30
+ <div class="draw-to-sketchpad">
31
+ <div class="drawtip">{{$t('openatccomponents.channelizationmap.drawtips')}}</div>
32
+ <div class="draw-operation">
33
+ <!-- <el-button
34
+ type="primary"
35
+ :disabled="!isSeletable"
36
+ @click="addText"
37
+ >添加text</el-button>-->
38
+ <el-button
39
+ v-for="editbtn in editBtnGroup"
40
+ :key="editbtn.type"
41
+ class="edit-icon-btn"
42
+ @click="handleAddIcon(editbtn)"
43
+ >
44
+ <LaneIconSvg :laneicon="editbtn"/>
45
+ <div
46
+ class="btn-label"
47
+ :class="{'highlightColor': editbtn.active === true, 'defaultColor': editbtn.active === false}"
48
+ >{{editbtn.label}}</div>
49
+ </el-button>
50
+ </div>
51
+ </div>
52
+ </div>
53
+ <!-- 画板区域 -->
54
+ <div class="sketchpad-area" id="sketchpadgroup" ref="sketchpadgroup">
55
+ <!-- <drr
56
+ id="sketchpadArea"
57
+ :resizable="false"
58
+ :x="allitem.x"
59
+ :y="allitem.y"
60
+ :w="allitem.w"
61
+ :h="allitem.h"
62
+ :angle="allitem.angle"
63
+ :selectable="false"
64
+ :aspectRatio="true"
65
+ > -->
66
+ <ChannelizationElements
67
+ id="channelizationElements"
68
+ :allitem="allitem"
69
+ :CrossMapVisible="CrossMapVisible"
70
+ :CrossMapData="CrossMapData"
71
+ :isSeletable="isSeletable"
72
+ :pointchange="pointchange"
73
+ @changeCrossMap="changeCrossMap"
74
+ :Motorways="Motorways"
75
+ :curChooseIconIndex="curChooseIconIndex"
76
+ @changeMotorwayItem="changeMotorwayItem"
77
+ @handleSelectIcon="handleSelectIcon"
78
+ :Countdown="Countdown"
79
+ :CountdownList="phaseCountdownMock"
80
+ @changeTimeItem="changeTimeItem"
81
+ :Pedwalk="Pedwalk"
82
+ @changePedItem="changePedItem"
83
+ :Detector="Detector"
84
+ @changeDetectorItem="changeDetectorItem"
85
+ :DetectorChart="DetectorChart"
86
+ :CurChooseIcon="curChooseIcon"
87
+ @changeDetectorChartItem="changeDetectorChartItem"
88
+ />
89
+ <!-- </drr> -->
90
+ </div>
91
+ <div class="draw-end-function">
92
+ <el-button type="primary" @click="handleReset()">{{$t('openatccomponents.button.reset')}}</el-button>
93
+ <!-- <el-button type="primary" @click="cancledraw()">{{$t('openatccomponents.button.Cancel')}}</el-button> -->
94
+ <el-button type="primary" @click="savedraw()">{{$t('openatccomponents.button.save')}}</el-button>
95
+ </div>
96
+ </div>
97
+ <div class="custom-edit" ref="customEdit">
98
+ <LaneEditPanel
99
+ :Data="curChooseIcon"
100
+ :choosedirections="curChooseIcon.direction"
101
+ :Motorways="Motorways"
102
+ @handleChooseDire="handleChooseDire"
103
+ @handleChoosePed="handleChoosePed"
104
+ @deleteItem="deleteItem"
105
+ @changeIconDataByType="changeIconDataByType"
106
+ @handleDisassociatePhase="handleDisassociatePhase"
107
+ />
108
+ </div>
109
+ </div>
110
+ <!-- <el-row>
111
+ <div class="phase-table">
112
+ <PhaseTable
113
+ :customlist="customlist"
114
+ @changeText="changeText"
115
+ @deleteItem="deleteItem"
116
+ @changeMotorwayItem="changeMotorwayItem"
117
+ @changeIconDataByType="changeIconDataByType"
118
+ />
119
+ </div>
120
+ </el-row> -->
121
+ </div>
122
+ </template>
123
+
124
+ <script>
125
+ import ChannelizationElements from './channelizationElements'
126
+
127
+ import LaneEditPanel from './laneEditPanel'
128
+
129
+ import PhaseTable from './table'
130
+ import PhaseDataModel from './utils/phaseDataModel.js'
131
+ import LaneIconSvg from './iconSvg/laneIcon'
132
+
133
+ import ImportDialog from './importDialog'
134
+ import Messagebox from '../../MessageBox/index'
135
+
136
+ import { mapState } from 'vuex'
137
+ import PhaseDataMgr from '../phaseDataMgr.js'
138
+
139
+ // import { getIframdevid } from '../../../../utils/auth.js'
140
+ import { saveChannelizatonChart } from '../../../../api/cross'
141
+ import { getMessageByCode } from '../../../../utils/responseMessage.js'
142
+
143
+ export default {
144
+ name: 'draw-channelization',
145
+ components: {
146
+ Messagebox,
147
+ ImportDialog,
148
+ ChannelizationElements,
149
+ PhaseTable,
150
+ LaneIconSvg,
151
+ LaneEditPanel
152
+ },
153
+ computed: {
154
+ ...mapState({
155
+ phaseList: state => state.globalParam.tscParam.phaseList,
156
+ PhaseDataMgr: state => state.globalParam.PhaseDataMgr
157
+ // ,curBodyWidth: state => state.globalParam.curBodyWidth
158
+ // ,curOpenatcAgentid: state => state.globalParam.curOpenatcAgentid
159
+ })
160
+ },
161
+ props: {
162
+ loadedChannelizatonData: {
163
+ type: Object
164
+ },
165
+ AgentId: {
166
+ type: String,
167
+ default: '0'
168
+ }
169
+ },
170
+ watch: {
171
+ // curBodyWidth: {
172
+ // handler: function (oldval, newval) {
173
+ // if (newval !== oldval) {
174
+ // this.resizePanelWidth(newval)
175
+ // }
176
+ // }
177
+ // },
178
+ // sidebar: {
179
+ // handler: function (oldval, newval) {
180
+ // setTimeout(() => {
181
+ // this.resizePanelWidth(this.curBodyWidth)
182
+ // }, 200)
183
+ // },
184
+ // deep: true
185
+ // },
186
+ AgentId: {
187
+ handler: function (val) {
188
+ // 平台设备切换时,清空上一个渠化配置
189
+ this.handleReset()
190
+ },
191
+ deep: true
192
+ },
193
+ loadedChannelizatonData: {
194
+ handler: function (val) {
195
+ // 平台设备切换时,重载当前路口保存的渠化配置
196
+ this.load('all')
197
+ },
198
+ deep: true
199
+ }
200
+ },
201
+ data () {
202
+ return {
203
+ visible: true,
204
+ canclesettingvisible: false,
205
+
206
+ isSeletable: true, // 元素是否可以编辑
207
+ index: 0,
208
+ motorid: 1, // 车道id
209
+ pedid: 1, // 人行道id
210
+ Motorways: [], // 管理所有自定义机动车图标数据
211
+ // Bicyclelanes: [], // 非机动车图标数据
212
+ customlist: [], // 所有自定义的图标列表
213
+ Texts: [], // 管理所有自定义文字数据
214
+ Pedwalk: [], // 管理所有人行横道
215
+ Detector: [], // 管理所有检测器
216
+ DetectorChart: [], // 管理所有检测器统计图
217
+ motorwayicon: '',
218
+ IconLengh: 45,
219
+ IconWdith: 100,
220
+ textareaW: 200,
221
+ textareaH: 100,
222
+ pedW: 206,
223
+ pedH: 22,
224
+ MapW: 800,
225
+ MapH: 200,
226
+ detectorW: 30,
227
+ detectorH: 30,
228
+ detectorchartW: 70,
229
+ detectorchartH: 100,
230
+ CrossMapData: {
231
+ svgstr: '',
232
+ imgfilesrc: ''
233
+ }, // 管理底图数据
234
+ allitem: {
235
+ x: 435,
236
+ y: 325,
237
+ w: 870,
238
+ h: 650,
239
+ angle: 0
240
+ },
241
+ countdownW: 140,
242
+ countdownH: 140,
243
+ Countdown: [], // 管理倒计时图标
244
+ phaseCountdownMock: [
245
+ {
246
+ id: 2,
247
+ phaseCountdown: 59,
248
+ phaseCountdownColor: '#fff'
249
+ },
250
+ {
251
+ id: 5,
252
+ phaseCountdown: 32,
253
+ phaseCountdownColor: '#fff'
254
+ }
255
+ ], // 倒计时动态数据模拟
256
+ svgvisible: false,
257
+ pointchange: false, // 控制选中时光标样式
258
+ CrossMapVisible: true, // 控制底图显示隐藏
259
+
260
+ curChooseIconIndex: -1,
261
+ curChooseIcon: {},
262
+ editBtnGroup: [
263
+ {
264
+ label: this.$t('openatccomponents.channelizationmap.motorway'),
265
+ type: 'motorway',
266
+ active: false,
267
+ width: '16px',
268
+ height: '16px'
269
+ },
270
+ // {
271
+ // label: this.$t('openatccomponents.channelizationmap.bicyclelane'),
272
+ // type: 'bicyclelane',
273
+ // active: false,
274
+ // width: '7px',
275
+ // height: '16px'
276
+ // },
277
+ {
278
+ label: this.$t('openatccomponents.channelizationmap.pedcrossing'),
279
+ type: 'pedcrossing',
280
+ active: false,
281
+ width: '16px',
282
+ height: '16px'
283
+ },
284
+ {
285
+ label: this.$t('openatccomponents.channelizationmap.countdown'),
286
+ type: 'countdown',
287
+ active: false,
288
+ width: '16px',
289
+ height: '16px'
290
+ },
291
+ {
292
+ label: this.$t('openatccomponents.channelizationmap.detector'),
293
+ type: 'detector',
294
+ active: false,
295
+ width: '16px',
296
+ height: '16px'
297
+ }
298
+ ],
299
+ AddType: '', // 正在添加的图标类型
300
+
301
+ dirNameMap: new Map([
302
+ [1, '直行'],
303
+ [2, '左转'],
304
+ [3, '右转'],
305
+ [4, '掉头']
306
+ ]),
307
+ phaseAssociatedMap: new Map() // 关联相位Map: key 是相位ID, value 是车道数据包含direction
308
+ }
309
+ },
310
+ methods: {
311
+ clickOpen () {
312
+ this.$refs.importDialog.clickOpen()
313
+ },
314
+
315
+ // 改变鼠标样式
316
+ changeMouse () {
317
+ if (!this.isSeletable) return
318
+ // document.getElementById('sketchpadArea').style.cursor = 'url(resource/pic/icons/magnifier3.cur) 12 12,crosshair'
319
+ document.getElementById('sketchpadArea').style.cursor =
320
+ 'url(resource/pic/icons/magnifier3.cur) 12 12,pointer'
321
+ this.pointchange = true
322
+ },
323
+
324
+ // 根据类型,表格编辑后,修改数据策略
325
+ changeIconDataByType (iconObj, changefield) {
326
+ this.curChooseIcon = JSON.parse(JSON.stringify(iconObj))
327
+ // 根据数据类型改变数据
328
+ switch (iconObj.icontype) {
329
+ case 'text':
330
+ this.changeText(iconObj, changefield)
331
+ break
332
+ case 'vehile':
333
+ this.changeMotorwayItem(iconObj, changefield)
334
+ if (changefield.indexOf('phaseid') !== -1) {
335
+ // 相位关联成功后,生成最新的相位关联map数据
336
+ this.PhaseDataMgr.updateLanePhaseAssociatedMap(this.Motorways)
337
+ }
338
+ break
339
+ case 'ped':
340
+ this.changePedItem(iconObj, changefield)
341
+ break
342
+ case 'countdown':
343
+ this.changeTimeItem(iconObj, changefield)
344
+ break
345
+ case 'detector':
346
+ this.changeDetectorItem(iconObj, changefield)
347
+ break
348
+ }
349
+ console.log('this.customlist', this.customlist)
350
+ },
351
+
352
+ // 被删除的相位所关联的车道,解除相位关联
353
+ handleDisassociatePhase (deletePhaseid) {
354
+ for (let i = 0; i < this.Motorways.length; i++) {
355
+ if (this.Motorways[i].phaseid === deletePhaseid) {
356
+ this.Motorways[i].phaseid = undefined
357
+ this.Motorways[i].phaselabel = ''
358
+ this.Motorways[i].phasetype = undefined
359
+ }
360
+ }
361
+ for (let i = 0; i < this.Pedwalk.length; i++) {
362
+ if (this.Pedwalk[i].phaseid === deletePhaseid) {
363
+ this.Pedwalk[i].phaseid = undefined
364
+ this.Pedwalk[i].phaselabel = ''
365
+ this.Pedwalk[i].phasetype = undefined
366
+ }
367
+ }
368
+ // 更新模型内初始相位列表数据
369
+ this.PhaseDataMgr.updateLanePhaseAssociatedMap(this.Motorways)
370
+ },
371
+
372
+ // 添加不同类型的车道图标
373
+ handleAddIcon (editbtn) {
374
+ // 按钮及图标高亮效果实现
375
+ this.editBtnGroup = this.editBtnGroup.map(btn => {
376
+ btn.active = false
377
+ return btn
378
+ })
379
+ for (let i = 0; i < this.editBtnGroup.length; i++) {
380
+ if (this.editBtnGroup[i].type === editbtn.type) {
381
+ this.editBtnGroup[i].active = true
382
+ }
383
+ }
384
+ this.changeMouse()
385
+ this.AddType = editbtn.type
386
+ },
387
+
388
+ addMotorwayIcon () {
389
+ this.PhaseDataModel = new PhaseDataModel()
390
+ let defaultMotorwayParam = {
391
+ x: this.setLeft,
392
+ y: this.setTop,
393
+ w: this.IconLengh,
394
+ h: this.IconWdith,
395
+ angle: 0
396
+ }
397
+ this.IconLengh = 45
398
+ this.IconWdith = 100
399
+ let Motorwaysitem = {
400
+ index: this.index,
401
+ id: this.motorid,
402
+ icontype: 'vehile',
403
+ icondireid: [1], // 前端区分箭头方向的标识
404
+ icondirename: [this.PhaseDataModel.getPhase(1).name],
405
+ lanePosition: 1,
406
+ controltype: 0,
407
+ phasetype: undefined,
408
+ phaseid: undefined,
409
+ phaselabel: '',
410
+ direction: [], // 值为1-16,对应16个方向
411
+ flip: false, // 车道类型是否翻转显示
412
+ ...defaultMotorwayParam
413
+ }
414
+ this.curChooseIconIndex = Motorwaysitem.index
415
+ this.curChooseIcon = JSON.parse(JSON.stringify(Motorwaysitem))
416
+ this.Motorways.push(Motorwaysitem)
417
+ this.customlist.push(Motorwaysitem)
418
+ this.index = this.increaseId(this.customlist, 'index')
419
+ this.motorid = this.increaseId(this.Motorways, 'id')
420
+ },
421
+ changeMotorwayItem (MotorwayItem, fields) {
422
+ this.changeItem(MotorwayItem, fields, this.Motorways)
423
+ this.changeCustomItem(MotorwayItem, fields)
424
+ },
425
+
426
+ // 选中图标
427
+ handleSelectIcon (iconobj) {
428
+ // console.log('选中的图标', iconobj)
429
+ this.curChooseIconIndex = iconobj.index
430
+ this.curChooseIcon = JSON.parse(JSON.stringify(iconobj))
431
+ },
432
+ // 根据多选的车道,修改车道图标
433
+ handleChooseDire (iconObj) {
434
+ this.curChooseIcon = JSON.parse(JSON.stringify(iconObj))
435
+ let editDirections = iconObj.icondireid
436
+ if (
437
+ this.curChooseIcon.icontype === 'vehile'
438
+ ) {
439
+ this.curChooseIcon.icondireid = editDirections
440
+ this.curChooseIcon.icondirename = editDirections.map(dir =>
441
+ this.dirNameMap.get(dir)
442
+ )
443
+ this.changeMotorwayItem(this.curChooseIcon, [
444
+ 'icondireid',
445
+ 'icondirename'
446
+ ])
447
+ }
448
+ console.log(this.curChooseIcon)
449
+ },
450
+
451
+ addPedwalkIcon () {
452
+ let defaulPedParam = {
453
+ x: this.setLeft,
454
+ y: this.setTop,
455
+ w: this.pedW,
456
+ h: this.pedH,
457
+ angle: 0,
458
+ viewbox: [0, 0, 206, 22]
459
+ }
460
+ this.pedW = 206
461
+ this.pedH = 22
462
+ let peditem = {
463
+ index: this.index,
464
+ id: this.pedid,
465
+ icontype: 'ped',
466
+ iconpedtypeid: 1,
467
+ iconpedposition: 1,
468
+ phasetype: undefined,
469
+ phaseid: undefined,
470
+ phaselabel: '',
471
+ ...defaulPedParam
472
+ }
473
+ this.curChooseIconIndex = peditem.index
474
+ this.curChooseIcon = JSON.parse(JSON.stringify(peditem))
475
+ this.Pedwalk.push(peditem)
476
+ this.customlist.push(peditem)
477
+ this.index = this.increaseId(this.customlist, 'index')
478
+ this.pedid = this.increaseId(this.Pedwalk, 'id')
479
+ },
480
+ changePedItem (PedItem, fields) {
481
+ this.changeItem(PedItem, fields, this.Pedwalk)
482
+ this.changeCustomItem(PedItem, fields)
483
+ },
484
+
485
+ handleChoosePed (pediconobj) {
486
+ this.curChooseIcon = JSON.parse(JSON.stringify(pediconobj))
487
+ if (this.curChooseIcon.icontype === 'ped') {
488
+ this.curChooseIcon.iconpedtypeid = pediconobj.iconpedtypeid
489
+ this.curChooseIcon.iconpedposition = pediconobj.iconpedposition
490
+ this.changePedItem(this.curChooseIcon, ['iconpedtypeid', 'iconpedposition'])
491
+ }
492
+ console.log(this.curChooseIcon)
493
+ },
494
+
495
+ addTimer () {
496
+ let defaultCountParam = {
497
+ x: this.setLeft,
498
+ y: this.setTop,
499
+ w: this.countdownW,
500
+ h: this.countdownH,
501
+ angle: 0
502
+ }
503
+ this.countdownW = 140
504
+ this.countdownH = 140
505
+ let countdownitem = {
506
+ index: this.index,
507
+ icontype: 'countdown',
508
+ ...defaultCountParam
509
+ }
510
+ this.curChooseIconIndex = countdownitem.index
511
+ this.curChooseIcon = JSON.parse(JSON.stringify(countdownitem))
512
+ this.Countdown.push(countdownitem)
513
+ this.customlist.push(countdownitem)
514
+ this.index = this.increaseId(this.customlist, 'index')
515
+ },
516
+ changeTimeItem (timeItem, fields) {
517
+ this.changeItem(timeItem, fields, this.Countdown)
518
+ this.changeCustomItem(timeItem, fields)
519
+ },
520
+
521
+ addAllDetector () {
522
+ // 统计图暂留
523
+ // this.addDetectorChart()
524
+ this.addDetector()
525
+ },
526
+ addDetector () {
527
+ let defaultDetectorParam = {
528
+ x: this.setLeft,
529
+ y: this.setTop,
530
+ w: this.detectorW,
531
+ h: this.detectorH,
532
+ angle: 0
533
+ }
534
+ this.detectorW = 30
535
+ this.detectorH = 30
536
+ let detectoritem = {
537
+ index: this.index,
538
+ icontype: 'detector',
539
+ detailtype: 'detector',
540
+ detectortype: 1, // 检测器类型: 1 车辆检测器 2 行人检测器
541
+ detectorid: undefined,
542
+ occupancythreshold: 80,
543
+ flowsaturationthreshold: 20,
544
+ ...defaultDetectorParam
545
+ }
546
+ this.curChooseIconIndex = detectoritem.index
547
+ this.curChooseIcon = JSON.parse(JSON.stringify(detectoritem))
548
+ this.Detector.push(detectoritem)
549
+ this.customlist.push(detectoritem)
550
+ this.index = this.increaseId(this.customlist, 'index')
551
+ },
552
+ changeDetectorItem (detectorItem, fields) {
553
+ this.changeItem(detectorItem, fields, this.Detector)
554
+ this.changeCustomItem(detectorItem, fields)
555
+ },
556
+ addDetectorChart () {
557
+ let defaultDetectorParam = {
558
+ x: this.setLeft,
559
+ y: this.setTop - 100, // 偏移到检测器正上方150
560
+ w: this.detectorchartW,
561
+ h: this.detectorchartH,
562
+ angle: 0
563
+ }
564
+ this.detectorchartW = 70
565
+ this.detectorchartH = 100
566
+ let detectoritem = {
567
+ index: this.index,
568
+ icontype: 'detector',
569
+ detailtype: 'detectorChart',
570
+ ...defaultDetectorParam
571
+ }
572
+ this.curChooseIconIndex = detectoritem.index
573
+ this.curChooseIcon = JSON.parse(JSON.stringify(detectoritem))
574
+ this.DetectorChart.push(detectoritem)
575
+ this.customlist.push(detectoritem)
576
+ this.index = this.increaseId(this.customlist, 'index')
577
+ },
578
+ changeDetectorChartItem (detectorItem, fields) {
579
+ this.changeItem(detectorItem, fields, this.DetectorChart)
580
+ this.changeCustomItem(detectorItem, fields)
581
+ },
582
+
583
+ // 添加文字
584
+ addText () {
585
+ let defaultTextParam = {
586
+ x: this.textareaW / 2,
587
+ y: this.textareaH / 2,
588
+ w: this.textareaW,
589
+ h: this.textareaH,
590
+ angle: 0
591
+ }
592
+ this.textareaW = 200
593
+ this.textareaH = 100
594
+ let textitem = {
595
+ index: this.index,
596
+ icontype: 'text',
597
+ text: '',
598
+ ...defaultTextParam
599
+ }
600
+ this.Texts.push(textitem)
601
+ this.customlist.push(textitem)
602
+ this.index = this.increaseId(this.customlist, 'index')
603
+ },
604
+ changeText (textobj, fields) {
605
+ this.changeItem(textobj, fields, this.Texts)
606
+ this.changeCustomItem(textobj, fields)
607
+ },
608
+
609
+ changeCustomItem (row, fields) {
610
+ this.changeItem(row, fields, this.customlist)
611
+ },
612
+ changeItem (row, fieldarr, data) {
613
+ for (let item of data) {
614
+ if (item.index === row.index) {
615
+ for (let field of fieldarr) {
616
+ item[field] = row[field]
617
+ }
618
+ }
619
+ }
620
+ },
621
+ deleteItem (row) {
622
+ let index = row.index
623
+ this.customlist = this.customlist.filter(ele => ele.index !== index)
624
+ switch (row.icontype) {
625
+ case 'text':
626
+ this.Texts = this.Texts.filter(ele => ele.index !== index)
627
+ break
628
+ case 'vehile':
629
+ this.Motorways = this.Motorways.filter(ele => ele.index !== index)
630
+ break
631
+ case 'ped':
632
+ this.Pedwalk = this.Pedwalk.filter(ele => ele.index !== index)
633
+ break
634
+ case 'countdown':
635
+ this.Countdown = this.Countdown.filter(ele => ele.index !== index)
636
+ break
637
+ case 'detector':
638
+ this.Detector = this.Detector.filter(ele => ele.index !== index)
639
+ this.DetectorChart = this.DetectorChart.filter(ele => ele.index !== index)
640
+ }
641
+ this.curChooseIconIndex = -1
642
+ this.curChooseIcon = {}
643
+ },
644
+
645
+ loadSvgString (type, imgstr) {
646
+ // 加载用户上传的底图svg字符串
647
+ if (type === 'vectorgraph') {
648
+ // 导入矢量图
649
+ this.getCrossMapViewbox(imgstr)
650
+ let defaultCrossMapParam = {
651
+ x: this.MapW / 2,
652
+ y: this.MapH / 2,
653
+ w: this.MapW,
654
+ h: this.MapH,
655
+ angle: 0
656
+ }
657
+ // (由于底图采用定位,导致脱离标准流,父元素高度塌陷,此处需要重新设置父元素高度,以防底图超出弹窗边界)
658
+ // this.$refs.crossmap.style.height = this.MapH
659
+ // this.$refs.crossmap.style.width = this.MapW
660
+ this.CrossMapData = {
661
+ type,
662
+ svgstr: imgstr,
663
+ ...defaultCrossMapParam
664
+ }
665
+ }
666
+ if (type === 'picture') {
667
+ // 导入图片
668
+ this.CrossMapData = {
669
+ type,
670
+ imgfilesrc: imgstr
671
+ }
672
+ }
673
+ },
674
+ getCrossMapViewbox (svgstr) {
675
+ // 获取户上传svg的viewBox属性的大小
676
+ let arr = svgstr.split('"')
677
+ let index, viewBox
678
+ for (let i = 0; i < arr.length - 1; i++) {
679
+ if (arr[i].indexOf('viewBox') !== -1) {
680
+ index = i
681
+ }
682
+ }
683
+ if (index) {
684
+ viewBox = arr[index + 1]
685
+ }
686
+ this.MapW = Number(viewBox.split(' ')[2])
687
+ this.MapH = Number(viewBox.split(' ')[3])
688
+ },
689
+ changeCrossMap (mapdata, fields) {
690
+ this.changeItem(mapdata, fields, [this.CrossMapData])
691
+ },
692
+
693
+ // 重置
694
+ handleReset () {
695
+ this.customlist = []
696
+ this.Texts = []
697
+ this.Motorways = []
698
+ this.Countdown = []
699
+ this.Pedwalk = []
700
+ this.Detector = []
701
+ this.DetectorChart = []
702
+ this.CrossMapData = {
703
+ svgstr: '',
704
+ imgfilesrc: ''
705
+ }
706
+ this.index = 0
707
+ this.curChooseIcon = {}
708
+ },
709
+ // 取消
710
+ cancledraw () {
711
+ this.canclesettingvisible = true
712
+ },
713
+ completeSetting () {
714
+ this.canclesettingvisible = false
715
+ this.$router.push('/overview/index')
716
+ },
717
+ cancleSetting () {
718
+ this.canclesettingvisible = false
719
+ },
720
+ // 保存
721
+ savedraw () {
722
+ let temp = {}
723
+ console.log(this.customlist)
724
+ for (const item of this.customlist) {
725
+ if (temp.hasOwnProperty(item.icontype)) {
726
+ temp[item.icontype].push(item)
727
+ } else {
728
+ temp[item.icontype] = [item]
729
+ }
730
+ }
731
+ if (this.CrossMapData.svgstr !== '') {
732
+ temp.crossMap = this.CrossMapData
733
+ }
734
+ this.saveChannelizatonChart(temp)
735
+ },
736
+ // 加载
737
+ load (type) {
738
+ this.curChooseIconIndex = -1
739
+ // this.getChannelizatonChart().then((channelizatondata) => {
740
+ // let savedTemp = JSON.parse(localStorage.getItem('savedTemp'))
741
+ let savedTemp = JSON.parse(JSON.stringify(this.loadedChannelizatonData))
742
+ let arr = []
743
+ for (const [key, value] of Object.entries(savedTemp)) {
744
+ if (key === 'vehile') {
745
+ this.Motorways = value
746
+ }
747
+ if (key === 'text') {
748
+ this.Texts = value
749
+ }
750
+ if (key === 'ped') {
751
+ this.Pedwalk = value
752
+ }
753
+ if (key === 'countdown') {
754
+ this.Countdown = value
755
+ }
756
+ if (key === 'detector') {
757
+ this.Detector = value.filter(ele => ele.detailtype === 'detector')
758
+ this.DetectorChart = value.filter(ele => ele.detailtype === 'detectorChart')
759
+ }
760
+ if (key === 'crossMap') {
761
+ this.CrossMapData = JSON.parse(JSON.stringify(value))
762
+ // if (value.type === 'vectorgraph') {
763
+ // // svg底图,只加载底图区域870*650范围内的元素
764
+ // let { svgstr, ...allitem } = value
765
+ // this.allitem = allitem
766
+ // }
767
+ } else {
768
+ if (value.length > 1) {
769
+ arr = [...arr, ...value]
770
+ } else {
771
+ arr.push(value[0])
772
+ }
773
+ }
774
+ }
775
+ this.customlist = JSON.parse(JSON.stringify(arr))
776
+ this.index = this.increaseId(this.customlist, 'index')
777
+ this.motorid = this.increaseId(this.Motorways, 'id')
778
+ this.pedid = this.increaseId(this.Pedwalk, 'id')
779
+ // if (type === 'all') {
780
+ // // 加载整体模版后,默认切换到元素不可编辑状态,但整体可编辑
781
+ // this.isSeletable = false
782
+ // } else {
783
+ // this.isSeletable = true
784
+ // }
785
+ // })
786
+ },
787
+ increaseId (arr, field) { // 实现field对应的index或者id, 在arr的基础上寻找最小的
788
+ let List = arr.map(ele => ele[field])
789
+ let i = List.length - 1
790
+ if (i >= 0) {
791
+ for (let j = 1; j <= 200; j++) {
792
+ if (!List.includes(j)) {
793
+ return j
794
+ }
795
+ }
796
+ }
797
+ },
798
+
799
+ exitEdit () {
800
+ this.isSeletable = !this.isSeletable
801
+ },
802
+
803
+ resetAddParams () {
804
+ this.AddType = ''
805
+ this.editBtnGroup = this.editBtnGroup.map(btn => {
806
+ btn.active = false
807
+ return btn
808
+ })
809
+ },
810
+ resizePanelWidth (bodywidth) {
811
+ // 根据1920适配,右侧过宽
812
+ // this.drawpartWidth = ((1089 / 1980) * bodywidth).toFixed(0)
813
+ // this.mainWidth = this.$refs.custommain.offsetWidth
814
+ // this.editpartWidth = Number(this.mainWidth) - Number(this.drawpartWidth) - 20
815
+ // this.$refs.customGroup.style.width = this.drawpartWidth + 'px'
816
+ // this.$refs.customEdit.style.width = this.editpartWidth + 'px'
817
+ // this.allitem.w = this.drawpartWidth
818
+ // this.allitem.x = this.drawpartWidth / 2
819
+ // 编辑面板固定宽度600,左侧适配
820
+ this.mainWidth = this.$refs.custommain.offsetWidth
821
+ this.drawpartWidth = this.mainWidth - 545
822
+ this.$refs.customGroup.style.width = this.drawpartWidth + 'px'
823
+ this.$refs.customGroup.style.transition = 'width 0.5s ease-in-out'
824
+ if (this.mainWidth && this.drawpartWidth) {
825
+ this.allitem.w = this.drawpartWidth
826
+ this.allitem.x = this.drawpartWidth / 2
827
+ }
828
+ },
829
+ saveChannelizatonChart (ChannelizatonData) {
830
+ // let agentid = getIframdevid()
831
+ let params = {
832
+ agentid: this.AgentId,
833
+ data: ChannelizatonData
834
+ }
835
+ saveChannelizatonChart(params).then(data => {
836
+ this.$emit('saveCallback', data)
837
+ if (!data.data.success) {
838
+ let parrenterror = getMessageByCode(data.data.code, this.$i18n.locale)
839
+ if (data.data.data) {
840
+ // 子类型错误
841
+ let childErrorCode = data.data.data.errorCode
842
+ if (childErrorCode) {
843
+ let childerror = getMessageByCode(data.data.data.errorCode, this.$i18n.locale)
844
+ this.$message.error(parrenterror + ',' + childerror)
845
+ }
846
+ } else {
847
+ this.$message.error(parrenterror)
848
+ }
849
+ return
850
+ }
851
+ let msg = this.$t('openatccomponents.common.savesucess')
852
+ this.$message({
853
+ message: msg,
854
+ type: 'success',
855
+ duration: 1 * 1000
856
+ })
857
+ })
858
+ },
859
+ // getChannelizatonChart () {
860
+ // let agentid = getIframdevid()
861
+ // return new Promise((resolve, reject) => {
862
+ // getChannelizatonChart(agentid).then(data => {
863
+ // if (!data.data.success) {
864
+ // let parrenterror = getMessageByCode(data.data.code, this.$i18n.locale)
865
+ // if (data.data.data) {
866
+ // // 子类型错误
867
+ // let childErrorCode = data.data.data.errorCode
868
+ // if (childErrorCode) {
869
+ // let childerror = getMessageByCode(data.data.data.errorCode, this.$i18n.locale)
870
+ // this.$message.error(parrenterror + ',' + childerror)
871
+ // }
872
+ // } else {
873
+ // this.$message.error(parrenterror)
874
+ // }
875
+ // this.handleReset()
876
+ // return
877
+ // }
878
+ // this.handleReset()
879
+ // let channelizatondata = data.data.data
880
+ // resolve(channelizatondata)
881
+ // })
882
+ // })
883
+ // },
884
+ handleClickSketchpad () {
885
+ // 监听画板区域点击事件,改变图标放置的位置
886
+ let sketchpadArea = document.getElementById('sketchpadArea')
887
+ let _this = this
888
+ sketchpadArea.addEventListener('click', function (e) {
889
+ if (_this.pointchange) {
890
+ document.getElementById('sketchpadArea').style.cursor =
891
+ 'url(resource/pic/icons/magnifier3.cur) 12 12,default'
892
+ _this.pointchange = false
893
+ _this.setLeft =
894
+ e.clientX -
895
+ document.getElementById('channelizationElements').getBoundingClientRect().left
896
+ _this.setTop =
897
+ e.clientY -
898
+ document.getElementById('channelizationElements').getBoundingClientRect().top
899
+ if (_this.AddType === '') return
900
+ switch (_this.AddType) {
901
+ case 'motorway':
902
+ _this.addMotorwayIcon()
903
+ break
904
+ case 'pedcrossing':
905
+ _this.addPedwalkIcon()
906
+ break
907
+ case 'countdown':
908
+ _this.addTimer()
909
+ break
910
+ case 'detector':
911
+ _this.addAllDetector()
912
+ }
913
+ _this.resetAddParams()
914
+ }
915
+ })
916
+ }
917
+ },
918
+ created () {},
919
+ mounted () {
920
+ // this.resizePanelWidth(this.curBodyWidth)
921
+ let PhaseData = new PhaseDataMgr(this.phaseList)
922
+ this.$store.dispatch('InitPhaseDataMgr', PhaseData)
923
+ this.handleClickSketchpad()
924
+ // 初始加载已保存的渠化图
925
+ // this.load('all')
926
+ }
927
+ // updated () {
928
+ // if (this.$refs.sketchpadgroup.offsetWidth) {
929
+ // this.allitem.w = this.$refs.sketchpadgroup.offsetWidth
930
+ // this.allitem.x = this.$refs.sketchpadgroup.offsetWidth / 2
931
+ // this.allitem.h = this.$refs.sketchpadgroup.offsetHeight
932
+ // this.allitem.y = this.$refs.sketchpadgroup.offsetHeight / 2
933
+ // }
934
+ // }
935
+ }
936
+ </script>
937
+
938
+ <style lang="css" rel="stylesheet/scss">
939
+ </style>