@kengic/vue 0.30.1-beta.82 → 0.30.1-beta.85

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 (870) hide show
  1. package/api/WMS/Controllers/DescriptionController/List.ts +84 -0
  2. package/api/WMS/Controllers/DescriptionController/ListByCodeNamesAndCodeValues.ts +21 -0
  3. package/api/WMS/Controllers/DescriptionController/index.ts +2 -0
  4. package/api/WMS/Controllers/SqlClientController/Execute.ts +21 -0
  5. package/api/WMS/Controllers/SqlClientController/ExecutePage.ts +21 -0
  6. package/api/WMS/Controllers/SqlClientController/index.ts +2 -0
  7. package/api/WMS/Controllers/SysPermissionController/List.ts +117 -0
  8. package/api/WMS/Controllers/SysPermissionController/index.ts +1 -0
  9. package/api/WMS/Controllers/VarConfigDescriptionController/Add.ts +21 -0
  10. package/api/WMS/Controllers/VarConfigDescriptionController/ListByFormId.ts +21 -0
  11. package/api/WMS/Controllers/VarConfigPossibilityController/ExecuteQuery.ts +36 -0
  12. package/api/WMS/Controllers/VarConfigPossibilityController/index.ts +1 -0
  13. package/api/WMS/Controllers/VarController/GetAll.ts +21 -0
  14. package/api/WMS/Controllers/VarController/index.ts +1 -0
  15. package/api/WMS/Controllers/VarDdaController/Create.ts +21 -0
  16. package/api/WMS/Controllers/VarDdaController/GetResultSetMetadataFromSql.ts +21 -0
  17. package/api/WMS/Controllers/VarDdaController/ValidateCopySql.ts +21 -0
  18. package/api/WMS/Controllers/VarDdaController/ValidateCreateSql.ts +21 -0
  19. package/api/WMS/Controllers/VarDdaController/ValidateDeleteSql.ts +21 -0
  20. package/api/WMS/Controllers/VarDdaController/ValidateFrmId.ts +21 -0
  21. package/api/WMS/Controllers/VarDdaController/ValidateSearchSql.ts +21 -0
  22. package/api/WMS/Controllers/VarDdaController/ValidateUpdateSql.ts +21 -0
  23. package/api/WMS/Controllers/VarDdaController/ValidateVarButtonVarName.ts +21 -0
  24. package/api/WMS/Controllers/VarDdaController/index.ts +9 -0
  25. package/api/WMS/Controllers/VarGridMasterController/QueryByID.ts +36 -0
  26. package/api/WMS/Controllers/VarGridMasterController/Update.ts +21 -0
  27. package/api/WMS/Controllers/VarGridMasterController/index.ts +2 -0
  28. package/api/WMS/Controllers/VarProfileMasterController/QueryByID.ts +36 -0
  29. package/api/WMS/Controllers/VarProfileMasterController/index.ts +1 -0
  30. package/api/WMS/Controllers/VarVariableController/Delete.ts +21 -0
  31. package/api/WMS/Controllers/VarVariableController/index.ts +1 -0
  32. package/api/WMS/Controllers/WarehouseController/ListVO.ts +45 -0
  33. package/api/WMS/Controllers/WorkstationController/List.ts +45 -0
  34. package/api/WMS/Controllers/WorkstationController/index.ts +1 -0
  35. package/api/WMS/index.ts +2 -0
  36. package/api/WMS/models.ts +2113 -0
  37. package/api/api.ts +1 -0
  38. package/api/def.ts +1 -0
  39. package/api/index.ts +2 -0
  40. package/asset/ant.less +678 -0
  41. package/asset/element-plus.css +112 -0
  42. package/asset/flag/cs_CZ.png +0 -0
  43. package/asset/flag/en.png +0 -0
  44. package/asset/flag/es_ES.png +0 -0
  45. package/asset/flag/fr_FR.png +0 -0
  46. package/asset/flag/km_KH.png +0 -0
  47. package/asset/flag/ko_KR.png +0 -0
  48. package/asset/flag/vi_VN.png +0 -0
  49. package/asset/flag/zh_CN.png +0 -0
  50. package/asset/images/warehouse.000000.svg +9 -0
  51. package/asset/images/warehouse.1890ff.svg +9 -0
  52. package/asset/index.less +347 -0
  53. package/asset/jeecg.less +382 -0
  54. package/asset/var.less +3 -0
  55. package/asset/vxe.less +51 -0
  56. package/bin/bin.mjs +57 -0
  57. package/bin/postinstall.mjs +69 -0
  58. package/component/KgAppSelect/KgAppSelect.event.ts +52 -0
  59. package/component/KgAppSelect/KgAppSelect.hooks.ts +50 -0
  60. package/component/KgAppSelect/KgAppSelect.less +30 -0
  61. package/component/KgAppSelect/KgAppSelect.store.ts +162 -0
  62. package/component/KgAppSelect/KgAppSelect.tsx +60 -0
  63. package/component/KgAppSelect/index.ts +4 -0
  64. package/component/KgButton/KgButton.Copy.tsx +143 -0
  65. package/component/KgButton/KgButton.Create.tsx +208 -0
  66. package/component/KgButton/KgButton.Delete.tsx +156 -0
  67. package/component/KgButton/KgButton.Export.tsx +294 -0
  68. package/component/KgButton/KgButton.Import.tsx +247 -0
  69. package/component/KgButton/KgButton.ImportTemplate.tsx +214 -0
  70. package/component/KgButton/KgButton.Item.tsx +128 -0
  71. package/component/KgButton/KgButton.Other.tsx +292 -0
  72. package/component/KgButton/KgButton.Search.tsx +146 -0
  73. package/component/KgButton/KgButton.Update.tsx +210 -0
  74. package/component/KgButton/KgButton.event.ts +157 -0
  75. package/component/KgButton/KgButton.hooks.ts +117 -0
  76. package/component/KgButton/KgButton.less +187 -0
  77. package/component/KgButton/KgButton.model.tsx +39 -0
  78. package/component/KgButton/KgButton.store.ts +333 -0
  79. package/component/KgButton/KgButton.tsx +221 -0
  80. package/component/KgCanvas/KgCanvas.ContextMenu.tsx +181 -0
  81. package/component/KgCanvas/KgCanvas.ToolbarButton.Fullscreen.tsx +80 -0
  82. package/component/KgCanvas/KgCanvas.ToolbarButton.Mode.tsx +68 -0
  83. package/component/KgCanvas/KgCanvas.ToolbarButton.OverviewScale.tsx +66 -0
  84. package/component/KgCanvas/KgCanvas.Tooltip.tsx +118 -0
  85. package/component/KgCanvas/KgCanvas.css +128 -0
  86. package/component/KgCanvas/KgCanvas.event.ts +380 -0
  87. package/component/KgCanvas/KgCanvas.hooks.ts +181 -0
  88. package/component/KgCanvas/KgCanvas.model.ts +31 -0
  89. package/component/KgCanvas/KgCanvas.service.tsx +116 -0
  90. package/component/KgCanvas/KgCanvas.store.ts +68 -0
  91. package/component/KgCanvas/KgCanvas.tsx +632 -0
  92. package/component/KgCanvas/index.ts +5 -0
  93. package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.AreaSelect.tsx +107 -0
  94. package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Canvas.service.tsx +3053 -0
  95. package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Canvas.tsx +606 -0
  96. package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Legend.tsx +71 -0
  97. package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Offline.tsx +50 -0
  98. package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Setting.tsx +169 -0
  99. package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Tab.Log.tsx +30 -0
  100. package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Tab.Rgv.tsx +672 -0
  101. package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.css +510 -0
  102. package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.hooks.ts +78 -0
  103. package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.model.ts +161 -0
  104. package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.store.tsx +744 -0
  105. package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.tsx +171 -0
  106. package/component/KgCircularShuttleMonitor/index.ts +4 -0
  107. package/component/KgForm/KgForm.event.ts +328 -0
  108. package/component/KgForm/KgForm.hooks.ts +158 -0
  109. package/component/KgForm/KgForm.less +0 -0
  110. package/component/KgForm/KgForm.store.ts +36 -0
  111. package/component/KgForm/KgForm.tsx +61 -0
  112. package/component/KgForm/index.ts +10 -0
  113. package/component/KgForm.Item/KgForm.Item.Addon.DynamicQueryOperator.tsx +88 -0
  114. package/component/KgForm.Item/KgForm.Item.Addon.Lookup.Modal.tsx +191 -0
  115. package/component/KgForm.Item/KgForm.Item.Addon.Lookup.tsx +76 -0
  116. package/component/KgForm.Item/KgForm.Item.Checkbox.tsx +61 -0
  117. package/component/KgForm.Item/KgForm.Item.CheckboxGroup.tsx +176 -0
  118. package/component/KgForm.Item/KgForm.Item.Date.tsx +88 -0
  119. package/component/KgForm.Item/KgForm.Item.DateRange.tsx +110 -0
  120. package/component/KgForm.Item/KgForm.Item.Image.tsx +35 -0
  121. package/component/KgForm.Item/KgForm.Item.Input.tsx +72 -0
  122. package/component/KgForm.Item/KgForm.Item.InputNumber.tsx +68 -0
  123. package/component/KgForm.Item/KgForm.Item.InputPassword.tsx +72 -0
  124. package/component/KgForm.Item/KgForm.Item.Link.tsx +37 -0
  125. package/component/KgForm.Item/KgForm.Item.RadioGroup.tsx +91 -0
  126. package/component/KgForm.Item/KgForm.Item.Select.service.tsx +317 -0
  127. package/component/KgForm.Item/KgForm.Item.Select.tsx +236 -0
  128. package/component/KgForm.Item/KgForm.Item.Switch.tsx +49 -0
  129. package/component/KgForm.Item/KgForm.Item.TextArea.tsx +99 -0
  130. package/component/KgForm.Item/KgForm.Item.less +476 -0
  131. package/component/KgForm.Item/KgForm.Item.model.ts +129 -0
  132. package/component/KgForm.Item/KgForm.Item.service.tsx +479 -0
  133. package/component/KgForm.Item/KgForm.Item.tsx +642 -0
  134. package/component/KgImage/KgImage.less +12 -0
  135. package/component/KgImage/KgImage.tsx +73 -0
  136. package/component/KgLayoutHeader/KgLayoutHeader.Locale.tsx +118 -0
  137. package/component/KgLayoutHeader/KgLayoutHeader.hooks.ts +31 -0
  138. package/component/KgLayoutHeader/KgLayoutHeader.less +14 -0
  139. package/component/KgLayoutHeader/index.ts +3 -0
  140. package/component/KgModal/KgModal.css +234 -0
  141. package/component/KgModal/KgModal.model.ts +9 -0
  142. package/component/KgModal/KgModal.service.ts +560 -0
  143. package/component/KgModal/KgModal.tsx +207 -0
  144. package/component/KgModal/KgModalHeaderButtons.tsx +130 -0
  145. package/component/KgModal02/KgModal02.css +11 -0
  146. package/component/KgModal02/KgModal02.model.ts +1 -0
  147. package/component/KgModal02/KgModal02.tsx +93 -0
  148. package/component/KgProgressA/KgProgressA.less +35 -0
  149. package/component/KgProgressA/KgProgressA.tsx +90 -0
  150. package/component/KgResizable/KgResizable.less +114 -0
  151. package/component/KgResizable/KgResizable.service.tsx +41 -0
  152. package/component/KgResizable/KgResizable.tsx +239 -0
  153. package/component/KgSearch/KgSearch.event.ts +78 -0
  154. package/component/KgSearch/KgSearch.hooks.ts +160 -0
  155. package/component/KgSearch/KgSearch.less +251 -0
  156. package/component/KgSearch/KgSearch.service.tsx +236 -0
  157. package/component/KgSearch/KgSearch.store.ts +609 -0
  158. package/component/KgSearch/KgSearch.tsx +506 -0
  159. package/component/KgSearch/index.ts +4 -0
  160. package/component/KgSimulator/KgSimulator.Canvas.Title.tsx +71 -0
  161. package/component/KgSimulator/KgSimulator.Canvas.service.tsx +3403 -0
  162. package/component/KgSimulator/KgSimulator.Canvas.tsx +1105 -0
  163. package/component/KgSimulator/KgSimulator.Menu.Scene.Create.CircularConveyor.tsx +258 -0
  164. package/component/KgSimulator/KgSimulator.Menu.Scene.Open.CircularConveyor.tsx +214 -0
  165. package/component/KgSimulator/KgSimulator.Menu.tsx +446 -0
  166. package/component/KgSimulator/KgSimulator.Panel.Prefab.tsx +87 -0
  167. package/component/KgSimulator/KgSimulator.Panel.Property.tsx +1120 -0
  168. package/component/KgSimulator/KgSimulator.Panel.Scene.tsx +819 -0
  169. package/component/KgSimulator/KgSimulator.Panel.tsx +149 -0
  170. package/component/KgSimulator/KgSimulator.Prefab.tsx +142 -0
  171. package/component/KgSimulator/KgSimulator.ToolbarButton.Prefab.tsx +44 -0
  172. package/component/KgSimulator/KgSimulator.ToolbarButton.Property.tsx +40 -0
  173. package/component/KgSimulator/KgSimulator.ToolbarButton.Scene.tsx +40 -0
  174. package/component/KgSimulator/KgSimulator.ToolbarButton.tsx +130 -0
  175. package/component/KgSimulator/KgSimulator.css +610 -0
  176. package/component/KgSimulator/KgSimulator.event.ts +197 -0
  177. package/component/KgSimulator/KgSimulator.hooks.ts +237 -0
  178. package/component/KgSimulator/KgSimulator.icons.tsx +148 -0
  179. package/component/KgSimulator/KgSimulator.model.ts +2629 -0
  180. package/component/KgSimulator/KgSimulator.store.tsx +1192 -0
  181. package/component/KgSimulator/KgSimulator.tsx +235 -0
  182. package/component/KgSimulator/KgSimulator.utils.ts +30 -0
  183. package/component/KgSimulator/index.ts +4 -0
  184. package/component/KgSubmit/KgSubmit.event.ts +272 -0
  185. package/component/KgSubmit/KgSubmit.hooks.ts +662 -0
  186. package/component/KgSubmit/KgSubmit.less +174 -0
  187. package/component/KgSubmit/KgSubmit.model.ts +82 -0
  188. package/component/KgSubmit/KgSubmit.service.tsx +368 -0
  189. package/component/KgSubmit/KgSubmit.store.ts +568 -0
  190. package/component/KgSubmit/KgSubmit.tsx +1132 -0
  191. package/component/KgSubmit/index.ts +5 -0
  192. package/component/KgTable/KgTable.BodyCell.tsx +475 -0
  193. package/component/KgTable/KgTable.HeadCell.tsx +333 -0
  194. package/component/KgTable/KgTable.Info.tsx +133 -0
  195. package/component/KgTable/KgTable.Setting.VarGridMaster.SaveAs.tsx +63 -0
  196. package/component/KgTable/KgTable.Setting.service.tsx +285 -0
  197. package/component/KgTable/KgTable.Setting.tsx +377 -0
  198. package/component/KgTable/KgTable.event.ts +206 -0
  199. package/component/KgTable/KgTable.hooks.ts +235 -0
  200. package/component/KgTable/KgTable.less +912 -0
  201. package/component/KgTable/KgTable.model.ts +73 -0
  202. package/component/KgTable/KgTable.service.tsx +781 -0
  203. package/component/KgTable/KgTable.store.ts +390 -0
  204. package/component/KgTable/KgTable.tsx +1105 -0
  205. package/component/KgTable/index.ts +5 -0
  206. package/component/KgTable02/KgTable02.BodyCell.tsx +407 -0
  207. package/component/KgTable02/KgTable02.css +199 -0
  208. package/component/KgTable02/KgTable02.event.ts +224 -0
  209. package/component/KgTable02/KgTable02.hooks.ts +111 -0
  210. package/component/KgTable02/KgTable02.store.ts +186 -0
  211. package/component/KgTable02/KgTable02.tsx +865 -0
  212. package/component/KgTable02/index.ts +5 -0
  213. package/component/KgVar/KgVar.Factory.tsx +146 -0
  214. package/component/KgVar/KgVar.css +125 -0
  215. package/component/KgVar/KgVar.event.ts +122 -0
  216. package/component/KgVar/KgVar.hooks.ts +543 -0
  217. package/component/KgVar/KgVar.model.ts +86 -0
  218. package/component/KgVar/KgVar.store.ts +2966 -0
  219. package/component/KgVar/KgVar.tsx +276 -0
  220. package/component/KgVar/index.ts +6 -0
  221. package/component/KgVarConfig/KgVarConfig.hooks.ts +19 -0
  222. package/component/KgVarConfig/KgVarConfig.less +499 -0
  223. package/component/KgVarConfig/KgVarConfig.model.ts +56 -0
  224. package/component/KgVarConfig/KgVarConfig.store.ts +29 -0
  225. package/component/KgVarConfig/KgVarConfig.tsx +139 -0
  226. package/component/KgVarConfig/components/KgVarConfig.SelectFormIdModal.tsx +138 -0
  227. package/component/KgVarConfig/components/KgVarConfigModal.tsx +228 -0
  228. package/component/KgVarConfig/components/button/KgVarConfig.Modal.Button.VarButton.tsx +647 -0
  229. package/component/KgVarConfig/components/button/KgVarConfig.Modal.Button.VarButtonConfig.tsx +64 -0
  230. package/component/KgVarConfig/components/button/KgVarConfig.Modal.Button.tsx +44 -0
  231. package/component/KgVarConfig/components/child/KgVarConfig.Modal.Child.tsx +265 -0
  232. package/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.VarProfileConfig.tsx +64 -0
  233. package/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.VarProfileMaster.service.tsx +408 -0
  234. package/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.VarProfileMaster.tsx +399 -0
  235. package/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.tsx +44 -0
  236. package/component/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.VarSubmitConfig.tsx +336 -0
  237. package/component/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.VarSubmitDetail.tsx +165 -0
  238. package/component/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.tsx +44 -0
  239. package/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.VarGridConfig.tsx +209 -0
  240. package/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.VarGridMaster.service.tsx +567 -0
  241. package/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.VarGridMaster.tsx +398 -0
  242. package/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.tsx +44 -0
  243. package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigControl.tsx +162 -0
  244. package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigDescription.tsx +119 -0
  245. package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigInput.tsx +322 -0
  246. package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigLookup.tsx +222 -0
  247. package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigPossibility.tsx +194 -0
  248. package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigTip.tsx +134 -0
  249. package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarVariable.tsx +129 -0
  250. package/component/KgVarConfig/index.ts +6 -0
  251. package/component/KgWarehouse/KgWarehouse.event.ts +63 -0
  252. package/component/KgWarehouse/KgWarehouse.guard.ts +77 -0
  253. package/component/KgWarehouse/KgWarehouse.hooks.ts +92 -0
  254. package/component/KgWarehouse/KgWarehouse.less +78 -0
  255. package/component/KgWarehouse/KgWarehouse.store.ts +135 -0
  256. package/component/KgWarehouse/KgWarehouse.tsx +321 -0
  257. package/component/KgWarehouse/index.ts +5 -0
  258. package/component/KgWorkStation/KgWorkStation.css +8 -0
  259. package/component/KgWorkStation/KgWorkStation.event.ts +54 -0
  260. package/component/KgWorkStation/KgWorkStation.hooks.ts +59 -0
  261. package/component/KgWorkStation/KgWorkStation.store.ts +144 -0
  262. package/component/KgWorkStation/KgWorkStation.tsx +254 -0
  263. package/component/KgWorkStation/index.ts +3 -0
  264. package/component/KgYesOrNo/KgYesOrNo.less +3 -0
  265. package/component/KgYesOrNo/KgYesOrNo.tsx +50 -0
  266. package/component/index.ts +23 -0
  267. package/config/config.hooks.ts +32 -0
  268. package/config/config.store.ts +705 -0
  269. package/config/index.ts +347 -0
  270. package/i18n/cs_CZ.ts +1 -0
  271. package/i18n/en.ts +236 -0
  272. package/i18n/es_ES.ts +1 -0
  273. package/i18n/fr_FR.ts +1 -0
  274. package/i18n/i18n.setup.ts +61 -0
  275. package/i18n/index.ts +23 -0
  276. package/i18n/km_KH.ts +1 -0
  277. package/i18n/ko_KR.ts +1 -0
  278. package/i18n/vi_VN.ts +1 -0
  279. package/i18n/zh_CN.ts +237 -0
  280. package/index.ts +15 -0
  281. package/model/index.ts +1695 -0
  282. package/package.json +10 -64
  283. package/page/KgPageCircularShuttleMonitor/KgPageCircularShuttleMonitor.tsx +13 -0
  284. package/page/KgPageDda/KgPageDda.css +0 -0
  285. package/page/KgPageDda/KgPageDda.tsx +140 -0
  286. package/page/KgPageDda/components/KgPageDda.Create.Basic.SqlModal.tsx +65 -0
  287. package/page/KgPageDda/components/KgPageDda.Create.Basic.tsx +219 -0
  288. package/page/KgPageDda/components/KgPageDda.Create.Button.tsx +427 -0
  289. package/page/KgPageDda/components/KgPageDda.Create.Menu.tsx +148 -0
  290. package/page/KgPageDda/components/KgPageDda.Create.Search.tsx +371 -0
  291. package/page/KgPageDda/components/KgPageDda.Create.Submit.tsx +362 -0
  292. package/page/KgPageDda/components/KgPageDda.Create.Table.tsx +372 -0
  293. package/page/KgPageDda/components/KgPageDda.Create.less +362 -0
  294. package/page/KgPageDda/components/KgPageDda.Create.store.ts +437 -0
  295. package/page/KgPageDda/components/KgPageDda.Create.tsx +330 -0
  296. package/page/KgPageDda/index.ts +4 -0
  297. package/page/KgPageSqlClient/KgPageSqlClient.tsx +14 -0
  298. package/page/KgPageSqlClient/components/KgSqlClient.Editor.tsx +84 -0
  299. package/page/KgPageSqlClient/components/KgSqlClient.ResultTab.tsx +145 -0
  300. package/page/KgPageSqlClient/components/KgSqlClient.Toolbar.Top.tsx +132 -0
  301. package/page/KgPageSqlClient/components/KgSqlClient.css +171 -0
  302. package/page/KgPageSqlClient/components/KgSqlClient.tsx +110 -0
  303. package/page/index.ts +55 -0
  304. package/project/build/config/themeConfig.ts +67 -0
  305. package/project/build/generate/generateModifyVars.ts +40 -0
  306. package/project/src/api/sys/menu.ts +37 -0
  307. package/project/src/api/sys/model/menuModel.ts +17 -0
  308. package/project/src/api/sys/model/userModel.ts +58 -0
  309. package/project/src/components/Application/src/useAppContext.ts +17 -0
  310. package/project/src/components/index.ts +3 -0
  311. package/project/src/enums/CompTypeEnum.ts +32 -0
  312. package/project/src/enums/DateTypeEnum.ts +8 -0
  313. package/project/src/enums/appEnum.ts +58 -0
  314. package/project/src/enums/breakpointEnum.ts +28 -0
  315. package/project/src/enums/cacheEnum.ts +39 -0
  316. package/project/src/enums/exceptionEnum.ts +27 -0
  317. package/project/src/enums/httpEnum.ts +50 -0
  318. package/project/src/enums/jeecgEnum.ts +23 -0
  319. package/project/src/enums/menuEnum.ts +50 -0
  320. package/project/src/enums/pageEnum.ts +19 -0
  321. package/project/src/enums/roleEnum.ts +7 -0
  322. package/project/src/enums/sizeEnum.ts +27 -0
  323. package/project/src/hooks/component/useFormItem.ts +44 -0
  324. package/project/src/hooks/component/usePageContext.ts +18 -0
  325. package/project/src/hooks/core/onMountedOrActivated.ts +18 -0
  326. package/project/src/hooks/core/useAttrs.ts +41 -0
  327. package/project/src/hooks/core/useContext.ts +30 -0
  328. package/project/src/hooks/core/useRefs.ts +16 -0
  329. package/project/src/hooks/core/useTimeout.ts +45 -0
  330. package/project/src/hooks/event/useBreakpoint.ts +89 -0
  331. package/project/src/hooks/event/useEventListener.ts +52 -0
  332. package/project/src/hooks/event/useIntersectionObserver.ts +42 -0
  333. package/project/src/hooks/event/useScrollTo.ts +59 -0
  334. package/project/src/hooks/event/useWindowSizeFn.ts +36 -0
  335. package/project/src/hooks/index.ts +26 -0
  336. package/project/src/hooks/jeecg/useAdaptiveWidth.ts +82 -0
  337. package/project/src/hooks/setting/index.ts +27 -0
  338. package/project/src/hooks/web/useAppInject.ts +10 -0
  339. package/project/src/hooks/web/useContentHeight.ts +175 -0
  340. package/project/src/hooks/web/useCopyToClipboard.ts +70 -0
  341. package/project/src/hooks/web/useDesign.ts +10 -0
  342. package/project/src/hooks/web/usePage.ts +87 -0
  343. package/project/src/hooks/web/usePagination.ts +31 -0
  344. package/project/src/hooks/web/useWebSocket.ts +95 -0
  345. package/project/src/layouts/default/content/useContentContext.ts +17 -0
  346. package/project/src/layouts/default/content/useContentViewHeight.ts +42 -0
  347. package/project/src/locales/helper.ts +36 -0
  348. package/project/src/locales/setupI18n.ts +43 -0
  349. package/project/src/locales/useLocale.ts +77 -0
  350. package/project/src/router/constant2.ts +5 -0
  351. package/project/src/router/types.ts +73 -0
  352. package/project/src/settings/componentSetting.ts +88 -0
  353. package/project/src/settings/designSetting.ts +14 -0
  354. package/project/src/settings/encryptionSetting.ts +11 -0
  355. package/project/src/settings/projectSetting.ts +194 -0
  356. package/project/src/store/modules/locale.ts +49 -0
  357. package/project/src/utils/auth/index.ts +42 -0
  358. package/project/src/utils/bem.ts +45 -0
  359. package/project/src/utils/cache/index.ts +31 -0
  360. package/project/src/utils/cache/memory.ts +99 -0
  361. package/project/src/utils/cache/persistent.ts +132 -0
  362. package/project/src/utils/cache/storageCache.ts +102 -0
  363. package/project/src/utils/cipher.ts +54 -0
  364. package/project/src/utils/color.ts +93 -0
  365. package/project/src/utils/common/compUtils.ts +292 -0
  366. package/project/src/utils/common/functionUtils.ts +14 -0
  367. package/project/src/utils/dateUtil.ts +14 -0
  368. package/project/src/utils/domUtils.ts +158 -0
  369. package/project/src/utils/encryption/signMd5Utils.ts +122 -0
  370. package/project/src/utils/env.ts +40 -0
  371. package/project/src/utils/event/index.ts +39 -0
  372. package/project/src/utils/factory/createAsyncComponent.tsx +50 -0
  373. package/project/src/utils/file/base64Conver.ts +15 -0
  374. package/project/src/utils/file/download.ts +37 -0
  375. package/project/src/utils/helper/treeHelper.ts +145 -0
  376. package/project/src/utils/helper/tsxHelper.ts +35 -0
  377. package/project/src/utils/index.index.ts +158 -0
  378. package/project/src/utils/is.ts +85 -0
  379. package/project/src/utils/mitt.ts +101 -0
  380. package/project/src/utils/propTypes.ts +34 -0
  381. package/project/src/utils/props.ts +139 -0
  382. package/project/src/utils/uuid.ts +29 -0
  383. package/project/types/axios.ts +57 -0
  384. package/project/types/config.ts +180 -0
  385. package/project/types/global.d.ts +191 -0
  386. package/project/types/store.ts +60 -0
  387. package/project/types/utils.ts +5 -0
  388. package/service/http-client.ts +257 -0
  389. package/type/env.d.ts +7 -0
  390. package/type/index.d.ts +1 -0
  391. package/util/ant-design-vue.ts +146 -0
  392. package/util/event.util.ts +24 -0
  393. package/util/kg-auth.util.ts +16 -0
  394. package/util/kg-route.util.ts +25 -0
  395. package/util/kg.util.tsx +2997 -0
  396. package/util/tsx.helper.tsx +45 -0
  397. package/CHANGELOG.md +0 -470
  398. package/README.md +0 -10
  399. package/dist/aim-outlined.8d38a0f9.mjs +0 -8
  400. package/dist/align-left-outlined.579b01c6.mjs +0 -8
  401. package/dist/audit-outlined.4555f723.mjs +0 -8
  402. package/dist/bubble-loading.cd2fe007.mjs +0 -8
  403. package/dist/bulb-outlined.a5bf22d8.mjs +0 -8
  404. package/dist/card-text-outline.6e053122.mjs +0 -8
  405. package/dist/caret-down-outlined.c0564a3f.mjs +0 -8
  406. package/dist/caret-left-outlined.35b1d7d1.mjs +0 -8
  407. package/dist/caret-right-filled.dbbda237.mjs +0 -8
  408. package/dist/caret-right-outlined-Btgsw6a_.0434903b.mjs +0 -8
  409. package/dist/caret-right-outlined.12fe6699.mjs +0 -8
  410. package/dist/caret-up-outlined.81b559ad.mjs +0 -8
  411. package/dist/check-box-outline-blank.d01a2055.mjs +0 -8
  412. package/dist/check-circle-outlined.b219949f.mjs +0 -8
  413. package/dist/check-outlined.59c42074.mjs +0 -8
  414. package/dist/check-square-outlined.233589d8.mjs +0 -8
  415. package/dist/checkbox-indeterminate.e5386a53.mjs +0 -8
  416. package/dist/clock-circle-outline.b9d0b3dc.mjs +0 -8
  417. package/dist/close-circle-outlined.85f75690.mjs +0 -8
  418. package/dist/close-outlined-DMcSQWxQ.5c3bee6f.mjs +0 -8
  419. package/dist/close-outlined.5757472a.mjs +0 -8
  420. package/dist/collapse-all-rounded.26ee73fc.mjs +0 -8
  421. package/dist/control-outlined.d66ac4d2.mjs +0 -8
  422. package/dist/copy-filled.a3dcd299.mjs +0 -8
  423. package/dist/copy-outlined.6a695d8a.mjs +0 -8
  424. package/dist/delete-outlined.20afb717.mjs +0 -8
  425. package/dist/delete-twotone.1d40696a.mjs +0 -8
  426. package/dist/double-right-outlined.f057a6b2.mjs +0 -8
  427. package/dist/down-circle-outlined.8ba93393.mjs +0 -8
  428. package/dist/download-outlined.e78b5364.mjs +0 -8
  429. package/dist/edit-outlined.0aae2217.mjs +0 -8
  430. package/dist/edit-twotone.67c952fa.mjs +0 -8
  431. package/dist/email-resend-outline.780506de.mjs +0 -8
  432. package/dist/exception-outlined.8c0003a2.mjs +0 -8
  433. package/dist/exclamation-circle-outlined-DZrXCnvM.d94561db.mjs +0 -8
  434. package/dist/expand-all-rounded.e01e6cb9.mjs +0 -8
  435. package/dist/eye-invisible-outlined.5f8d6151.mjs +0 -8
  436. package/dist/eye-outlined.b25b4d28.mjs +0 -8
  437. package/dist/file-text-outline.2fbccab6.mjs +0 -8
  438. package/dist/fit-screen-outline.7341560f.mjs +0 -8
  439. package/dist/fullscreen-exit-outlined-X1iYkFc4.a1640595.mjs +0 -8
  440. package/dist/fullscreen-exit-outlined.b77fa876.mjs +0 -8
  441. package/dist/fullscreen-outlined-DDBrsRcy.b9f9d4a1.mjs +0 -8
  442. package/dist/fullscreen-outlined.cd572ef8.mjs +0 -8
  443. package/dist/holder-outlined.9e698750.mjs +0 -8
  444. package/dist/index.css +0 -1
  445. package/dist/info-circle-outlined.7ddbd554.mjs +0 -8
  446. package/dist/kengic-vue.js +0 -224291
  447. package/dist/key-return-thin.ce6f074c.mjs +0 -8
  448. package/dist/loading-outlined.13a15197.mjs +0 -8
  449. package/dist/more-outlined.8e1202ac.mjs +0 -8
  450. package/dist/one-to-one-outlined.ac265beb.mjs +0 -8
  451. package/dist/palette-swatch-variant.f7258843.mjs +0 -8
  452. package/dist/partition-outlined.1bcf4f37.mjs +0 -8
  453. package/dist/pause-circle-outlined.cd534f5f.mjs +0 -8
  454. package/dist/pause-outlined.fca0d0f9.mjs +0 -8
  455. package/dist/pause-rounded.1ed7cc39.mjs +0 -8
  456. package/dist/play-arrow-rounded.90fc4173.mjs +0 -8
  457. package/dist/plus-outlined.bdaa6481.mjs +0 -8
  458. package/dist/printer-outlined.a8d0d92b.mjs +0 -8
  459. package/dist/profile-outlined.1059fb0d.mjs +0 -8
  460. package/dist/project/build/config/themeConfig.ts +0 -67
  461. package/dist/project/build/generate/generateModifyVars.ts +0 -39
  462. package/dist/project/index.ts +0 -1
  463. package/dist/project/types/global.d.ts +0 -184
  464. package/dist/release-gate-check.8c1ba629.mjs +0 -8
  465. package/dist/reload-outlined.d320578b.mjs +0 -8
  466. package/dist/retweet-outlined.bfa9b123.mjs +0 -8
  467. package/dist/save-as-outline-rounded.c65d61b2.mjs +0 -8
  468. package/dist/save-outline-rounded.c9c3f880.mjs +0 -8
  469. package/dist/search-outlined-Od1M_oxf.71fb0c01.mjs +0 -8
  470. package/dist/search-outlined.ba5c5a3f.mjs +0 -8
  471. package/dist/setting-outlined.a3caf743.mjs +0 -8
  472. package/dist/src/api/WMS/Controllers/DescriptionController/List.d.ts +0 -51
  473. package/dist/src/api/WMS/Controllers/DescriptionController/ListByCodeNamesAndCodeValues.d.ts +0 -16
  474. package/dist/src/api/WMS/Controllers/DescriptionController/index.d.ts +0 -2
  475. package/dist/src/api/WMS/Controllers/SqlClientController/Execute.d.ts +0 -16
  476. package/dist/src/api/WMS/Controllers/SqlClientController/ExecutePage.d.ts +0 -16
  477. package/dist/src/api/WMS/Controllers/SqlClientController/index.d.ts +0 -2
  478. package/dist/src/api/WMS/Controllers/SysPermissionController/List.d.ts +0 -73
  479. package/dist/src/api/WMS/Controllers/SysPermissionController/index.d.ts +0 -1
  480. package/dist/src/api/WMS/Controllers/VarConfigDescriptionController/Add.d.ts +0 -16
  481. package/dist/src/api/WMS/Controllers/VarConfigDescriptionController/ListByFormId.d.ts +0 -16
  482. package/dist/src/api/WMS/Controllers/VarConfigPossibilityController/ExecuteQuery.d.ts +0 -18
  483. package/dist/src/api/WMS/Controllers/VarConfigPossibilityController/index.d.ts +0 -1
  484. package/dist/src/api/WMS/Controllers/VarController/GetAll.d.ts +0 -16
  485. package/dist/src/api/WMS/Controllers/VarController/index.d.ts +0 -1
  486. package/dist/src/api/WMS/Controllers/VarDdaController/Create.d.ts +0 -16
  487. package/dist/src/api/WMS/Controllers/VarDdaController/GetResultSetMetadataFromSql.d.ts +0 -16
  488. package/dist/src/api/WMS/Controllers/VarDdaController/ValidateCopySql.d.ts +0 -16
  489. package/dist/src/api/WMS/Controllers/VarDdaController/ValidateCreateSql.d.ts +0 -16
  490. package/dist/src/api/WMS/Controllers/VarDdaController/ValidateDeleteSql.d.ts +0 -16
  491. package/dist/src/api/WMS/Controllers/VarDdaController/ValidateFrmId.d.ts +0 -16
  492. package/dist/src/api/WMS/Controllers/VarDdaController/ValidateSearchSql.d.ts +0 -16
  493. package/dist/src/api/WMS/Controllers/VarDdaController/ValidateUpdateSql.d.ts +0 -16
  494. package/dist/src/api/WMS/Controllers/VarDdaController/ValidateVarButtonVarName.d.ts +0 -16
  495. package/dist/src/api/WMS/Controllers/VarDdaController/index.d.ts +0 -9
  496. package/dist/src/api/WMS/Controllers/VarGridMasterController/QueryByID.d.ts +0 -19
  497. package/dist/src/api/WMS/Controllers/VarGridMasterController/Update.d.ts +0 -16
  498. package/dist/src/api/WMS/Controllers/VarGridMasterController/index.d.ts +0 -2
  499. package/dist/src/api/WMS/Controllers/VarProfileMasterController/QueryByID.d.ts +0 -19
  500. package/dist/src/api/WMS/Controllers/VarProfileMasterController/index.d.ts +0 -1
  501. package/dist/src/api/WMS/Controllers/VarVariableController/Delete.d.ts +0 -16
  502. package/dist/src/api/WMS/Controllers/VarVariableController/index.d.ts +0 -1
  503. package/dist/src/api/WMS/Controllers/WarehouseController/ListVO.d.ts +0 -25
  504. package/dist/src/api/WMS/Controllers/WorkstationController/List.d.ts +0 -25
  505. package/dist/src/api/WMS/Controllers/WorkstationController/index.d.ts +0 -1
  506. package/dist/src/api/WMS/index.d.ts +0 -2
  507. package/dist/src/api/WMS/models.d.ts +0 -1128
  508. package/dist/src/api/api.d.ts +0 -1
  509. package/dist/src/api/def.d.ts +0 -1
  510. package/dist/src/api/index.d.ts +0 -2
  511. package/dist/src/component/KgAppSelect/KgAppSelect.d.ts +0 -46
  512. package/dist/src/component/KgAppSelect/KgAppSelect.event.d.ts +0 -31
  513. package/dist/src/component/KgAppSelect/KgAppSelect.hooks.d.ts +0 -18
  514. package/dist/src/component/KgAppSelect/KgAppSelect.store.d.ts +0 -33
  515. package/dist/src/component/KgAppSelect/index.d.ts +0 -3
  516. package/dist/src/component/KgButton/KgButton.Copy.d.ts +0 -40
  517. package/dist/src/component/KgButton/KgButton.Create.d.ts +0 -40
  518. package/dist/src/component/KgButton/KgButton.Delete.d.ts +0 -40
  519. package/dist/src/component/KgButton/KgButton.Export.d.ts +0 -40
  520. package/dist/src/component/KgButton/KgButton.Import.d.ts +0 -40
  521. package/dist/src/component/KgButton/KgButton.ImportTemplate.d.ts +0 -40
  522. package/dist/src/component/KgButton/KgButton.Item.d.ts +0 -39
  523. package/dist/src/component/KgButton/KgButton.Other.d.ts +0 -40
  524. package/dist/src/component/KgButton/KgButton.Search.d.ts +0 -40
  525. package/dist/src/component/KgButton/KgButton.Update.d.ts +0 -40
  526. package/dist/src/component/KgButton/KgButton.d.ts +0 -39
  527. package/dist/src/component/KgButton/KgButton.event.d.ts +0 -81
  528. package/dist/src/component/KgButton/KgButton.hooks.d.ts +0 -67
  529. package/dist/src/component/KgButton/KgButton.model.d.ts +0 -31
  530. package/dist/src/component/KgButton/KgButton.store.d.ts +0 -92
  531. package/dist/src/component/KgCanvas/KgCanvas.ContextMenu.d.ts +0 -100
  532. package/dist/src/component/KgCanvas/KgCanvas.ToolbarButton.Fullscreen.d.ts +0 -37
  533. package/dist/src/component/KgCanvas/KgCanvas.ToolbarButton.Mode.d.ts +0 -7
  534. package/dist/src/component/KgCanvas/KgCanvas.ToolbarButton.OverviewScale.d.ts +0 -37
  535. package/dist/src/component/KgCanvas/KgCanvas.Tooltip.d.ts +0 -27
  536. package/dist/src/component/KgCanvas/KgCanvas.d.ts +0 -232
  537. package/dist/src/component/KgCanvas/KgCanvas.event.d.ts +0 -216
  538. package/dist/src/component/KgCanvas/KgCanvas.hooks.d.ts +0 -100
  539. package/dist/src/component/KgCanvas/KgCanvas.model.d.ts +0 -27
  540. package/dist/src/component/KgCanvas/KgCanvas.service.d.ts +0 -17
  541. package/dist/src/component/KgCanvas/KgCanvas.store.d.ts +0 -9
  542. package/dist/src/component/KgCanvas/index.d.ts +0 -4
  543. package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.AreaSelect.d.ts +0 -5
  544. package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Canvas.d.ts +0 -5
  545. package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Canvas.service.d.ts +0 -63
  546. package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Legend.d.ts +0 -5
  547. package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Offline.d.ts +0 -5
  548. package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Setting.d.ts +0 -5
  549. package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Tab.Log.d.ts +0 -5
  550. package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Tab.Rgv.d.ts +0 -33
  551. package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.d.ts +0 -5
  552. package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.hooks.d.ts +0 -29
  553. package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.model.d.ts +0 -127
  554. package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.store.d.ts +0 -354
  555. package/dist/src/component/KgCircularShuttleMonitor/index.d.ts +0 -3
  556. package/dist/src/component/KgForm/KgForm.d.ts +0 -413
  557. package/dist/src/component/KgForm/KgForm.event.d.ts +0 -202
  558. package/dist/src/component/KgForm/KgForm.hooks.d.ts +0 -92
  559. package/dist/src/component/KgForm/KgForm.store.d.ts +0 -23
  560. package/dist/src/component/KgForm/index.d.ts +0 -4
  561. package/dist/src/component/KgForm.Item/KgForm.Item.Addon.DynamicQueryOperator.d.ts +0 -49
  562. package/dist/src/component/KgForm.Item/KgForm.Item.Addon.Lookup.Modal.d.ts +0 -16
  563. package/dist/src/component/KgForm.Item/KgForm.Item.Addon.Lookup.d.ts +0 -31
  564. package/dist/src/component/KgForm.Item/KgForm.Item.Checkbox.d.ts +0 -98
  565. package/dist/src/component/KgForm.Item/KgForm.Item.CheckboxGroup.d.ts +0 -95
  566. package/dist/src/component/KgForm.Item/KgForm.Item.Date.d.ts +0 -95
  567. package/dist/src/component/KgForm.Item/KgForm.Item.DateRange.d.ts +0 -95
  568. package/dist/src/component/KgForm.Item/KgForm.Item.Image.d.ts +0 -90
  569. package/dist/src/component/KgForm.Item/KgForm.Item.Input.d.ts +0 -94
  570. package/dist/src/component/KgForm.Item/KgForm.Item.InputNumber.d.ts +0 -94
  571. package/dist/src/component/KgForm.Item/KgForm.Item.InputPassword.d.ts +0 -94
  572. package/dist/src/component/KgForm.Item/KgForm.Item.Link.d.ts +0 -93
  573. package/dist/src/component/KgForm.Item/KgForm.Item.RadioGroup.d.ts +0 -96
  574. package/dist/src/component/KgForm.Item/KgForm.Item.Select.d.ts +0 -95
  575. package/dist/src/component/KgForm.Item/KgForm.Item.Select.service.d.ts +0 -28
  576. package/dist/src/component/KgForm.Item/KgForm.Item.Switch.d.ts +0 -94
  577. package/dist/src/component/KgForm.Item/KgForm.Item.TextArea.d.ts +0 -94
  578. package/dist/src/component/KgForm.Item/KgForm.Item.d.ts +0 -95
  579. package/dist/src/component/KgForm.Item/KgForm.Item.model.d.ts +0 -111
  580. package/dist/src/component/KgForm.Item/KgForm.Item.service.d.ts +0 -17
  581. package/dist/src/component/KgImage/KgImage.d.ts +0 -100
  582. package/dist/src/component/KgLayoutHeader/KgLayoutHeader.Locale.d.ts +0 -38
  583. package/dist/src/component/KgLayoutHeader/KgLayoutHeader.hooks.d.ts +0 -4
  584. package/dist/src/component/KgLayoutHeader/index.d.ts +0 -2
  585. package/dist/src/component/KgModal/KgModal.d.ts +0 -817
  586. package/dist/src/component/KgModal/KgModal.model.d.ts +0 -8
  587. package/dist/src/component/KgModal/KgModal.service.d.ts +0 -37
  588. package/dist/src/component/KgModal/KgModalHeaderButtons.d.ts +0 -92
  589. package/dist/src/component/KgModal02/KgModal02.d.ts +0 -470
  590. package/dist/src/component/KgModal02/KgModal02.model.d.ts +0 -1
  591. package/dist/src/component/KgProgressA/KgProgressA.d.ts +0 -85
  592. package/dist/src/component/KgResizable/KgResizable.d.ts +0 -119
  593. package/dist/src/component/KgResizable/KgResizable.service.d.ts +0 -12
  594. package/dist/src/component/KgSearch/KgSearch.d.ts +0 -26
  595. package/dist/src/component/KgSearch/KgSearch.event.d.ts +0 -31
  596. package/dist/src/component/KgSearch/KgSearch.hooks.d.ts +0 -72
  597. package/dist/src/component/KgSearch/KgSearch.service.d.ts +0 -32
  598. package/dist/src/component/KgSearch/KgSearch.store.d.ts +0 -103
  599. package/dist/src/component/KgSearch/index.d.ts +0 -3
  600. package/dist/src/component/KgSimulator/KgSimulator.Canvas.Title.d.ts +0 -11
  601. package/dist/src/component/KgSimulator/KgSimulator.Canvas.d.ts +0 -11
  602. package/dist/src/component/KgSimulator/KgSimulator.Canvas.service.d.ts +0 -80
  603. package/dist/src/component/KgSimulator/KgSimulator.Menu.Scene.Create.CircularConveyor.d.ts +0 -36
  604. package/dist/src/component/KgSimulator/KgSimulator.Menu.Scene.Open.CircularConveyor.d.ts +0 -36
  605. package/dist/src/component/KgSimulator/KgSimulator.Menu.d.ts +0 -4
  606. package/dist/src/component/KgSimulator/KgSimulator.Panel.Prefab.d.ts +0 -4
  607. package/dist/src/component/KgSimulator/KgSimulator.Panel.Property.d.ts +0 -4
  608. package/dist/src/component/KgSimulator/KgSimulator.Panel.Scene.d.ts +0 -4
  609. package/dist/src/component/KgSimulator/KgSimulator.Panel.d.ts +0 -97
  610. package/dist/src/component/KgSimulator/KgSimulator.Prefab.d.ts +0 -108
  611. package/dist/src/component/KgSimulator/KgSimulator.ToolbarButton.Prefab.d.ts +0 -9
  612. package/dist/src/component/KgSimulator/KgSimulator.ToolbarButton.Property.d.ts +0 -9
  613. package/dist/src/component/KgSimulator/KgSimulator.ToolbarButton.Scene.d.ts +0 -9
  614. package/dist/src/component/KgSimulator/KgSimulator.ToolbarButton.d.ts +0 -113
  615. package/dist/src/component/KgSimulator/KgSimulator.d.ts +0 -33
  616. package/dist/src/component/KgSimulator/KgSimulator.event.d.ts +0 -93
  617. package/dist/src/component/KgSimulator/KgSimulator.hooks.d.ts +0 -103
  618. package/dist/src/component/KgSimulator/KgSimulator.icons.d.ts +0 -10
  619. package/dist/src/component/KgSimulator/KgSimulator.model.d.ts +0 -1502
  620. package/dist/src/component/KgSimulator/KgSimulator.store.d.ts +0 -474
  621. package/dist/src/component/KgSimulator/KgSimulator.utils.d.ts +0 -21
  622. package/dist/src/component/KgSimulator/index.d.ts +0 -3
  623. package/dist/src/component/KgSubmit/KgSubmit.d.ts +0 -21
  624. package/dist/src/component/KgSubmit/KgSubmit.event.d.ts +0 -135
  625. package/dist/src/component/KgSubmit/KgSubmit.hooks.d.ts +0 -358
  626. package/dist/src/component/KgSubmit/KgSubmit.model.d.ts +0 -57
  627. package/dist/src/component/KgSubmit/KgSubmit.service.d.ts +0 -29
  628. package/dist/src/component/KgSubmit/KgSubmit.store.d.ts +0 -112
  629. package/dist/src/component/KgSubmit/index.d.ts +0 -4
  630. package/dist/src/component/KgTable/KgTable.BodyCell.d.ts +0 -60
  631. package/dist/src/component/KgTable/KgTable.HeadCell.d.ts +0 -51
  632. package/dist/src/component/KgTable/KgTable.Info.d.ts +0 -57
  633. package/dist/src/component/KgTable/KgTable.Setting.VarGridMaster.SaveAs.d.ts +0 -4
  634. package/dist/src/component/KgTable/KgTable.Setting.d.ts +0 -20
  635. package/dist/src/component/KgTable/KgTable.Setting.service.d.ts +0 -22
  636. package/dist/src/component/KgTable/KgTable.d.ts +0 -39
  637. package/dist/src/component/KgTable/KgTable.event.d.ts +0 -111
  638. package/dist/src/component/KgTable/KgTable.hooks.d.ts +0 -135
  639. package/dist/src/component/KgTable/KgTable.model.d.ts +0 -65
  640. package/dist/src/component/KgTable/KgTable.service.d.ts +0 -34
  641. package/dist/src/component/KgTable/KgTable.store.d.ts +0 -91
  642. package/dist/src/component/KgTable/index.d.ts +0 -4
  643. package/dist/src/component/KgTable02/KgTable02.BodyCell.d.ts +0 -72
  644. package/dist/src/component/KgTable02/KgTable02.d.ts +0 -46
  645. package/dist/src/component/KgTable02/KgTable02.event.d.ts +0 -123
  646. package/dist/src/component/KgTable02/KgTable02.hooks.d.ts +0 -62
  647. package/dist/src/component/KgTable02/KgTable02.store.d.ts +0 -62
  648. package/dist/src/component/KgTable02/index.d.ts +0 -4
  649. package/dist/src/component/KgVar/KgVar.Factory.d.ts +0 -106
  650. package/dist/src/component/KgVar/KgVar.d.ts +0 -120
  651. package/dist/src/component/KgVar/KgVar.event.d.ts +0 -75
  652. package/dist/src/component/KgVar/KgVar.hooks.d.ts +0 -307
  653. package/dist/src/component/KgVar/KgVar.model.d.ts +0 -70
  654. package/dist/src/component/KgVar/KgVar.store.d.ts +0 -269
  655. package/dist/src/component/KgVar/index.d.ts +0 -5
  656. package/dist/src/component/KgVarConfig/KgVarConfig.d.ts +0 -3
  657. package/dist/src/component/KgVarConfig/KgVarConfig.hooks.d.ts +0 -3
  658. package/dist/src/component/KgVarConfig/KgVarConfig.model.d.ts +0 -42
  659. package/dist/src/component/KgVarConfig/KgVarConfig.store.d.ts +0 -16
  660. package/dist/src/component/KgVarConfig/components/KgVarConfig.SelectFormIdModal.d.ts +0 -27
  661. package/dist/src/component/KgVarConfig/components/KgVarConfigModal.d.ts +0 -53
  662. package/dist/src/component/KgVarConfig/components/button/KgVarConfig.Modal.Button.VarButton.d.ts +0 -7
  663. package/dist/src/component/KgVarConfig/components/button/KgVarConfig.Modal.Button.VarButtonConfig.d.ts +0 -7
  664. package/dist/src/component/KgVarConfig/components/button/KgVarConfig.Modal.Button.d.ts +0 -5
  665. package/dist/src/component/KgVarConfig/components/child/KgVarConfig.Modal.Child.d.ts +0 -7
  666. package/dist/src/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.VarProfileConfig.d.ts +0 -7
  667. package/dist/src/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.VarProfileMaster.d.ts +0 -7
  668. package/dist/src/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.VarProfileMaster.service.d.ts +0 -17
  669. package/dist/src/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.d.ts +0 -5
  670. package/dist/src/component/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.VarSubmitConfig.d.ts +0 -7
  671. package/dist/src/component/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.VarSubmitDetail.d.ts +0 -7
  672. package/dist/src/component/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.d.ts +0 -5
  673. package/dist/src/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.VarGridConfig.d.ts +0 -7
  674. package/dist/src/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.VarGridMaster.d.ts +0 -7
  675. package/dist/src/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.VarGridMaster.service.d.ts +0 -23
  676. package/dist/src/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.d.ts +0 -5
  677. package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigControl.d.ts +0 -2
  678. package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigDescription.d.ts +0 -2
  679. package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigInput.d.ts +0 -2
  680. package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigLookup.d.ts +0 -2
  681. package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigPossibility.d.ts +0 -2
  682. package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigTip.d.ts +0 -2
  683. package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarVariable.d.ts +0 -2
  684. package/dist/src/component/KgVarConfig/index.d.ts +0 -3
  685. package/dist/src/component/KgWarehouse/KgWarehouse.d.ts +0 -50
  686. package/dist/src/component/KgWarehouse/KgWarehouse.event.d.ts +0 -30
  687. package/dist/src/component/KgWarehouse/KgWarehouse.guard.d.ts +0 -8
  688. package/dist/src/component/KgWarehouse/KgWarehouse.hooks.d.ts +0 -41
  689. package/dist/src/component/KgWarehouse/KgWarehouse.store.d.ts +0 -27
  690. package/dist/src/component/KgWarehouse/index.d.ts +0 -4
  691. package/dist/src/component/KgYesOrNo/KgYesOrNo.d.ts +0 -60
  692. package/dist/src/component/index.d.ts +0 -21
  693. package/dist/src/config/config.hooks.d.ts +0 -10
  694. package/dist/src/config/config.store.d.ts +0 -307
  695. package/dist/src/config/index.d.ts +0 -63
  696. package/dist/src/const/const.model.d.ts +0 -1768
  697. package/dist/src/const/form-id.const.d.ts +0 -44
  698. package/dist/src/const/index.d.ts +0 -2
  699. package/dist/src/i18n/cs_CZ.d.ts +0 -2
  700. package/dist/src/i18n/en.d.ts +0 -237
  701. package/dist/src/i18n/es_ES.d.ts +0 -2
  702. package/dist/src/i18n/fr_FR.d.ts +0 -2
  703. package/dist/src/i18n/i18n.setup.d.ts +0 -22
  704. package/dist/src/i18n/index.d.ts +0 -3
  705. package/dist/src/i18n/km_KH.d.ts +0 -2
  706. package/dist/src/i18n/ko_KR.d.ts +0 -2
  707. package/dist/src/i18n/vi_VN.d.ts +0 -2
  708. package/dist/src/i18n/zh_CN.d.ts +0 -238
  709. package/dist/src/index.d.ts +0 -12
  710. package/dist/src/page/KgPageCircularShuttleMonitor/KgPageCircularShuttleMonitor.d.ts +0 -11
  711. package/dist/src/page/KgPageDda/KgPageDda.d.ts +0 -8
  712. package/dist/src/page/KgPageDda/components/KgPageDda.Create.Basic.SqlModal.d.ts +0 -32
  713. package/dist/src/page/KgPageDda/components/KgPageDda.Create.Basic.d.ts +0 -7
  714. package/dist/src/page/KgPageDda/components/KgPageDda.Create.Button.d.ts +0 -7
  715. package/dist/src/page/KgPageDda/components/KgPageDda.Create.Menu.d.ts +0 -7
  716. package/dist/src/page/KgPageDda/components/KgPageDda.Create.Search.d.ts +0 -7
  717. package/dist/src/page/KgPageDda/components/KgPageDda.Create.Submit.d.ts +0 -7
  718. package/dist/src/page/KgPageDda/components/KgPageDda.Create.Table.d.ts +0 -7
  719. package/dist/src/page/KgPageDda/components/KgPageDda.Create.d.ts +0 -33
  720. package/dist/src/page/KgPageDda/components/KgPageDda.Create.store.d.ts +0 -39
  721. package/dist/src/page/KgPageDda/index.d.ts +0 -5
  722. package/dist/src/page/KgPageSqlClient/KgPageSqlClient.d.ts +0 -12
  723. package/dist/src/page/KgPageSqlClient/components/KgSqlClient.Editor.d.ts +0 -13
  724. package/dist/src/page/KgPageSqlClient/components/KgSqlClient.ResultTab.d.ts +0 -36
  725. package/dist/src/page/KgPageSqlClient/components/KgSqlClient.Toolbar.Top.d.ts +0 -7
  726. package/dist/src/page/KgPageSqlClient/components/KgSqlClient.d.ts +0 -5
  727. package/dist/src/page/index.d.ts +0 -8
  728. package/dist/src/project/build/getConfigFileName.d.ts +0 -5
  729. package/dist/src/project/build/index.d.ts +0 -1
  730. package/dist/src/project/src/api/sys/menu.d.ts +0 -4
  731. package/dist/src/project/src/api/sys/model/menuModel.d.ts +0 -15
  732. package/dist/src/project/src/api/sys/model/userModel.d.ts +0 -46
  733. package/dist/src/project/src/components/Application/src/useAppContext.d.ts +0 -9
  734. package/dist/src/project/src/components/index.d.ts +0 -2
  735. package/dist/src/project/src/enums/CompTypeEnum.d.ts +0 -19
  736. package/dist/src/project/src/enums/DateTypeEnum.d.ts +0 -8
  737. package/dist/src/project/src/enums/appEnum.d.ts +0 -40
  738. package/dist/src/project/src/enums/breakpointEnum.d.ts +0 -18
  739. package/dist/src/project/src/enums/cacheEnum.d.ts +0 -18
  740. package/dist/src/project/src/enums/exceptionEnum.d.ts +0 -17
  741. package/dist/src/project/src/enums/httpEnum.d.ts +0 -38
  742. package/dist/src/project/src/enums/jeecgEnum.d.ts +0 -16
  743. package/dist/src/project/src/enums/menuEnum.d.ts +0 -35
  744. package/dist/src/project/src/enums/pageEnum.d.ts +0 -14
  745. package/dist/src/project/src/enums/roleEnum.d.ts +0 -4
  746. package/dist/src/project/src/enums/sizeEnum.d.ts +0 -18
  747. package/dist/src/project/src/hooks/component/useFormItem.d.ts +0 -2
  748. package/dist/src/project/src/hooks/component/usePageContext.d.ts +0 -10
  749. package/dist/src/project/src/hooks/core/onMountedOrActivated.d.ts +0 -1
  750. package/dist/src/project/src/hooks/core/useAttrs.d.ts +0 -9
  751. package/dist/src/project/src/hooks/core/useContext.d.ts +0 -11
  752. package/dist/src/project/src/hooks/core/useRefs.d.ts +0 -2
  753. package/dist/src/project/src/hooks/core/useTimeout.d.ts +0 -10
  754. package/dist/src/project/src/hooks/event/useBreakpoint.d.ts +0 -22
  755. package/dist/src/project/src/hooks/event/useEventListener.d.ts +0 -14
  756. package/dist/src/project/src/hooks/event/useIntersectionObserver.d.ts +0 -13
  757. package/dist/src/project/src/hooks/event/useScrollTo.d.ts +0 -10
  758. package/dist/src/project/src/hooks/event/useWindowSizeFn.d.ts +0 -7
  759. package/dist/src/project/src/hooks/index.d.ts +0 -21
  760. package/dist/src/project/src/hooks/jeecg/useAdaptiveWidth.d.ts +0 -18
  761. package/dist/src/project/src/hooks/setting/index.d.ts +0 -2
  762. package/dist/src/project/src/hooks/web/useAppInject.d.ts +0 -3
  763. package/dist/src/project/src/hooks/web/useContentHeight.d.ts +0 -24
  764. package/dist/src/project/src/hooks/web/useCopyToClipboard.d.ts +0 -10
  765. package/dist/src/project/src/hooks/web/useDesign.d.ts +0 -4
  766. package/dist/src/project/src/hooks/web/usePage.d.ts +0 -10
  767. package/dist/src/project/src/hooks/web/usePagination.d.ts +0 -7
  768. package/dist/src/project/src/hooks/web/useWebSocket.d.ts +0 -18
  769. package/dist/src/project/src/layouts/default/content/useContentContext.d.ts +0 -9
  770. package/dist/src/project/src/layouts/default/content/useContentViewHeight.d.ts +0 -7
  771. package/dist/src/project/src/locales/helper.d.ts +0 -5
  772. package/dist/src/project/src/locales/setupI18n.d.ts +0 -4
  773. package/dist/src/project/src/locales/useLocale.d.ts +0 -11
  774. package/dist/src/project/src/router/constant2.d.ts +0 -3
  775. package/dist/src/project/src/router/types.d.ts +0 -61
  776. package/dist/src/project/src/settings/componentSetting.d.ts +0 -44
  777. package/dist/src/project/src/settings/designSetting.d.ts +0 -6
  778. package/dist/src/project/src/settings/encryptionSetting.d.ts +0 -6
  779. package/dist/src/project/src/settings/projectSetting.d.ts +0 -3
  780. package/dist/src/project/src/store/modules/locale.d.ts +0 -38
  781. package/dist/src/project/src/utils/auth/index.d.ts +0 -19
  782. package/dist/src/project/src/utils/bem.d.ts +0 -15
  783. package/dist/src/project/src/utils/cache/index.d.ts +0 -7
  784. package/dist/src/project/src/utils/cache/memory.d.ts +0 -22
  785. package/dist/src/project/src/utils/cache/persistent.d.ts +0 -33
  786. package/dist/src/project/src/utils/cache/storageCache.d.ts +0 -8
  787. package/dist/src/project/src/utils/cipher.d.ts +0 -19
  788. package/dist/src/project/src/utils/color.d.ts +0 -29
  789. package/dist/src/project/src/utils/common/compUtils.d.ts +0 -87
  790. package/dist/src/project/src/utils/common/functionUtils.d.ts +0 -6
  791. package/dist/src/project/src/utils/dateUtil.d.ts +0 -4
  792. package/dist/src/project/src/utils/domUtils.d.ts +0 -28
  793. package/dist/src/project/src/utils/encryption/signMd5Utils.d.ts +0 -29
  794. package/dist/src/project/src/utils/env.d.ts +0 -16
  795. package/dist/src/project/src/utils/event/index.d.ts +0 -3
  796. package/dist/src/project/src/utils/factory/createAsyncComponent.d.ts +0 -9
  797. package/dist/src/project/src/utils/file/base64Conver.d.ts +0 -4
  798. package/dist/src/project/src/utils/file/download.d.ts +0 -9
  799. package/dist/src/project/src/utils/helper/treeHelper.d.ts +0 -34
  800. package/dist/src/project/src/utils/helper/tsxHelper.d.ts +0 -13
  801. package/dist/src/project/src/utils/index.index.d.ts +0 -42
  802. package/dist/src/project/src/utils/is.d.ts +0 -17
  803. package/dist/src/project/src/utils/mitt.d.ts +0 -26
  804. package/dist/src/project/src/utils/propTypes.d.ts +0 -9
  805. package/dist/src/project/src/utils/props.d.ts +0 -68
  806. package/dist/src/project/src/utils/uuid.d.ts +0 -2
  807. package/dist/src/project/types/axios.d.ts +0 -35
  808. package/dist/src/project/types/config.d.ts +0 -119
  809. package/dist/src/project/types/store.d.ts +0 -43
  810. package/dist/src/project/types/utils.d.ts +0 -4
  811. package/dist/src/service/http-client.d.ts +0 -98
  812. package/dist/src/util/ant-design-vue.d.ts +0 -347
  813. package/dist/src/util/event.util.d.ts +0 -15
  814. package/dist/src/util/kg-auth.util.d.ts +0 -12
  815. package/dist/src/util/kg-route.util.d.ts +0 -18
  816. package/dist/src/util/kg.util.d.ts +0 -349
  817. package/dist/src/util/tsx.helper.d.ts +0 -23
  818. package/dist/stop-outlined.9f2c4f61.mjs +0 -8
  819. package/dist/stop.ea3dde55.mjs +0 -8
  820. package/dist/three-dots-loading-bIlrTJYR.f189f620.mjs +0 -8
  821. package/dist/upload-outlined.c576b26a.mjs +0 -8
  822. /package/{dist/src/api/WMS/Controllers/VarConfigDescriptionController/index.d.ts → api/WMS/Controllers/VarConfigDescriptionController/index.ts} +0 -0
  823. /package/{dist/src/api/WMS/Controllers/WarehouseController/index.d.ts → api/WMS/Controllers/WarehouseController/index.ts} +0 -0
  824. /package/{dist/src/api/WMS/Controllers/index.d.ts → api/WMS/Controllers/index.ts} +0 -0
  825. /package/{dist/src/component/KgButton/index.d.ts → component/KgButton/index.ts} +0 -0
  826. /package/{dist/src/component/KgForm.Item/index.d.ts → component/KgForm.Item/index.ts} +0 -0
  827. /package/{dist/src/component/KgImage/index.d.ts → component/KgImage/index.ts} +0 -0
  828. /package/{dist/src/component/KgModal/index.d.ts → component/KgModal/index.ts} +0 -0
  829. /package/{dist/src/component/KgModal02/index.d.ts → component/KgModal02/index.ts} +0 -0
  830. /package/{dist/src/component/KgProgressA/index.d.ts → component/KgProgressA/index.ts} +0 -0
  831. /package/{dist/src/component/KgResizable/index.d.ts → component/KgResizable/index.ts} +0 -0
  832. /package/{dist/src/component/KgSearch/KgSearch.model.d.ts → component/KgSearch/KgSearch.model.ts} +0 -0
  833. /package/{dist/src/component/KgTable02/KgTable02.model.d.ts → component/KgTable02/KgTable02.model.ts} +0 -0
  834. /package/{dist/src/component/KgYesOrNo/index.d.ts → component/KgYesOrNo/index.ts} +0 -0
  835. /package/{dist/src/page/KgPageCircularShuttleMonitor/index.d.ts → page/KgPageCircularShuttleMonitor/index.ts} +0 -0
  836. /package/{dist/src/page/KgPageSqlClient/index.d.ts → page/KgPageSqlClient/index.ts} +0 -0
  837. /package/{dist/project → project}/build/constant.ts +0 -0
  838. /package/{dist/project → project}/build/generate/icon/index.ts +0 -0
  839. /package/{dist/project → project}/build/getConfigFileName.ts +0 -0
  840. /package/{dist/project → project}/build/index.ts +0 -0
  841. /package/{dist/project → project}/build/script/buildConf.ts +0 -0
  842. /package/{dist/project → project}/build/script/postBuild.ts +0 -0
  843. /package/{dist/project → project}/build/utils.ts +0 -0
  844. /package/{dist/project → project}/build/vite/plugin/compress.ts +0 -0
  845. /package/{dist/project → project}/build/vite/plugin/html.ts +0 -0
  846. /package/{dist/project → project}/build/vite/plugin/imagemin.ts +0 -0
  847. /package/{dist/project → project}/build/vite/plugin/index.ts +0 -0
  848. /package/{dist/project → project}/build/vite/plugin/pwa.ts +0 -0
  849. /package/{dist/project → project}/build/vite/plugin/styleImport.ts +0 -0
  850. /package/{dist/project → project}/build/vite/plugin/svgSprite.ts +0 -0
  851. /package/{dist/project → project}/build/vite/plugin/theme.ts +0 -0
  852. /package/{dist/project → project}/build/vite/plugin/visualizer.ts +0 -0
  853. /package/{dist/project → project}/build/vite/proxy.ts +0 -0
  854. /package/{dist/src/project/index.d.ts → project/index.ts} +0 -0
  855. /package/{dist/src/project/src/api/index.d.ts → project/src/api/index.ts} +0 -0
  856. /package/{dist/src/project/src/api/sys/model/uploadModel.d.ts → project/src/api/sys/model/uploadModel.ts} +0 -0
  857. /package/{dist/src/project/src/components/Dropdown/index.d.ts → project/src/components/Dropdown/index.ts} +0 -0
  858. /package/{dist/src/project/src/components/Dropdown/src/typing.d.ts → project/src/components/Dropdown/src/typing.ts} +0 -0
  859. /package/{dist/src/project/src/enums/index.d.ts → project/src/enums/index.ts} +0 -0
  860. /package/{dist/src/project/src/index.d.ts → project/src/index.ts} +0 -0
  861. /package/{dist/src/project/src/layouts/index.d.ts → project/src/layouts/index.ts} +0 -0
  862. /package/{dist/src/project/src/locales/index.d.ts → project/src/locales/index.ts} +0 -0
  863. /package/{dist/src/project/src/router/index.d.ts → project/src/router/index.ts} +0 -0
  864. /package/{dist/src/project/src/settings/index.d.ts → project/src/settings/index.ts} +0 -0
  865. /package/{dist/src/project/src/store/index.d.ts → project/src/store/index.ts} +0 -0
  866. /package/{dist/src/project/src/store/modules/index.d.ts → project/src/store/modules/index.ts} +0 -0
  867. /package/{dist/src/project/src/utils/index.d.ts → project/src/utils/index.ts} +0 -0
  868. /package/{dist/src/project/types/index.d.ts → project/types/index.ts} +0 -0
  869. /package/{dist/src/service/index.d.ts → service/index.ts} +0 -0
  870. /package/{dist/src/util/index.d.ts → util/index.ts} +0 -0
@@ -0,0 +1,3403 @@
1
+ import { ____ERROR____, ____WARN_____ } from '@kengic/core.core';
2
+ import { Q } from '@thymine/xunee';
3
+ import { getCurrentInstance } from 'vue';
4
+ import { httpClient } from '../../service';
5
+ import { KgUtil } from '../../util';
6
+ import { useKgSimulator } from './KgSimulator.hooks';
7
+ import {
8
+ Agent,
9
+ AgentStatusUpdateRequest,
10
+ CreateAgentRequest,
11
+ Creator,
12
+ DestroyAgentRequest,
13
+ Destroyer,
14
+ Edge,
15
+ INodeProperty,
16
+ JackUpTransferStation,
17
+ NODE_KEY,
18
+ NODE_UI_KEY,
19
+ PalletStackerStation,
20
+ PhotoelectricSensor,
21
+ Station,
22
+ WEBSOCKET_PING_TYPE,
23
+ WebSocketMessage,
24
+ } from './KgSimulator.model';
25
+ import { getNodeUiByCode, isSamePoint, timestamp } from './KgSimulator.utils';
26
+
27
+ export type IUseDraw = {
28
+ /**
29
+ * 绘制环形输送线--绘制传感器.
30
+ *
31
+ * @param param
32
+ * @param param.gdcgq 传感器.
33
+ */
34
+ $CircularConveyor$drawCGQ(param?: { gdcgq: PhotoelectricSensor }): Q.Node | null;
35
+
36
+ /**
37
+ * 绘制环形输送线--绘制创建者.
38
+ *
39
+ * @param param
40
+ * @param param.creator 创建者.
41
+ */
42
+ $CircularConveyor$drawCJZ(param?: { creator: Creator }): Q.Node | null;
43
+
44
+ /**
45
+ * 绘制环形输送线--绘制代理者.
46
+ *
47
+ * @param param
48
+ * @param param.agent 代理者.
49
+ */
50
+ $CircularConveyor$drawDLZ(param?: { agent: Agent }): Q.Node | null;
51
+
52
+ /**
53
+ * 绘制环形输送线--绘制叠盘机.
54
+ *
55
+ * @param param
56
+ * @param param.dpj 叠盘机.
57
+ */
58
+ $CircularConveyor$drawDPJ(param?: { dpj: PalletStackerStation }): Q.Node | null;
59
+
60
+ /**
61
+ * 绘制环形输送线--绘制输送机.
62
+ *
63
+ * @param param
64
+ * @param param.ptssj 输送机.
65
+ */
66
+ $CircularConveyor$drawSSJ(param?: { ptssj: Station }): Q.Node | null;
67
+
68
+ /**
69
+ * 绘制环形输送线--绘制销毁者.
70
+ *
71
+ * @param param
72
+ * @param param.destroyer 销毁者.
73
+ */
74
+ $CircularConveyor$drawXHZ(param?: { destroyer: Destroyer }): Q.Node | null;
75
+
76
+ /**
77
+ * 绘制环形输送线--绘制移栽机.
78
+ *
79
+ * @param param
80
+ * @param param.dsyzj 移栽机.
81
+ */
82
+ $CircularConveyor$drawYZJ(param?: { dsyzj: JackUpTransferStation }): Q.Node | null;
83
+
84
+ /**
85
+ * 绘制图形.
86
+ *
87
+ * @param param
88
+ * @param param.isZoomToOverview 是否纵览比例, 默认为 false.
89
+ */
90
+ draw(param?: { isZoomToOverview?: boolean }): void;
91
+ };
92
+
93
+ /**
94
+ * 动画效果--选中--计时器.
95
+ */
96
+ let $Animation$Select$Timer: number = -1;
97
+
98
+ /**
99
+ * 动画效果--选中--间隔时间.
100
+ */
101
+ let $Animation$Select$Interval: number = 250;
102
+
103
+ /**
104
+ * 动画效果--选中--虚线偏移.
105
+ */
106
+ let $Animation$Select$DashOffset: number = 0;
107
+
108
+ /**
109
+ * 动画效果--代理者--移动--计时器.
110
+ */
111
+ let $Animation$Agent$Move$Timer: number = -1;
112
+
113
+ /**
114
+ * 动画效果--代理者--移动--间隔时间.
115
+ */
116
+
117
+ /**
118
+ * 动画效果--移栽机--上升下降箭头--计时器.
119
+ */
120
+ let $Animation$YZJ$Arrow$Timer: number = -1;
121
+
122
+ /**
123
+ * 动画效果--移栽机--上升下降箭头--间隔时间.
124
+ */
125
+ let $Animation$YZJ$Arrow$Interval: number = 200;
126
+
127
+ /**
128
+ * 动画效果--叠盘机--叠盘拆盘箭头--计时器.
129
+ */
130
+ let $Animation$DPJ$Arrow$Timer: number = -1;
131
+
132
+ /**
133
+ * 动画效果--叠盘机--叠盘拆盘箭头--间隔时间.
134
+ */
135
+ let $Animation$DPJ$Arrow$Interval: number = 200;
136
+
137
+ //region 钩子: 绘制
138
+ //----------------------------------------------------------------------------------------------------
139
+ /**
140
+ * 钩子: 绘制.
141
+ */
142
+ export function useDraw(): IUseDraw {
143
+ if (getCurrentInstance()?.type?.name !== 'KgSimulatorCanvas') {
144
+ throw new Error('useDraw() 只能在 KgSimulatorCanvas 组件内调用');
145
+ }
146
+
147
+ const kgSimulator = useKgSimulator();
148
+
149
+ //region DATA
150
+ // ----------------------------------------------------------------------------------------------------
151
+
152
+ /**
153
+ * <p>是否正在绘制. 如果上次绘制尚未完成, 此时又发起了新的绘制请求, 则并不会执行新的绘制.</p>
154
+ */
155
+ let isDrawing = false;
156
+ // ----------------------------------------------------------------------------------------------------
157
+ //endregion
158
+
159
+ //region FUNCTION
160
+ // ----------------------------------------------------------------------------------------------------
161
+
162
+ //region 方法: 绘制环形输送线
163
+ //----------------------------------------------------------------------------------------------------
164
+ /**
165
+ * 绘制环形输送线.
166
+ *
167
+ * @param param
168
+ * @param param.isZoomToOverview 是否纵览比例, 默认为 false.
169
+ */
170
+ function $CircularConveyor$draw(param?: { isZoomToOverview?: boolean }) {
171
+ try {
172
+ // 上次绘制尚未完成, 取消本次绘制,
173
+ if (isDrawing) {
174
+ return;
175
+ }
176
+
177
+ isDrawing = true;
178
+
179
+ kgSimulator.get$graph()!.clear();
180
+
181
+ $CircularConveyor$drawSSJList();
182
+ $CircularConveyor$drawYZJList();
183
+ $CircularConveyor$drawDPJList();
184
+ $CircularConveyor$drawCGQList();
185
+
186
+ $CircularConveyor$drawCJZList();
187
+ $CircularConveyor$drawXHZList();
188
+
189
+ $CircularConveyor$drawEdgeList();
190
+
191
+ $CircularConveyor$drawDLZList();
192
+
193
+ if (kgSimulator.$Mode$IsSimulate && kgSimulator.$Config$CircularConveyor$IsDrawDefaultPhotoelectricSensor) {
194
+ $CircularConveyor$drawDefaultCGQList();
195
+ }
196
+
197
+ if (param?.isZoomToOverview ?? false) {
198
+ setTimeout(() => {
199
+ kgSimulator.get$graph()!.zoomToOverview(false);
200
+ }, 200);
201
+ }
202
+
203
+ isDrawing = false;
204
+ } catch (e) {
205
+ isDrawing = false;
206
+ throw e;
207
+ } finally {
208
+ }
209
+ }
210
+
211
+ //region 方法: 绘制「创建者」列表
212
+ //----------------------------------------------------------------------------------------------------
213
+ /**
214
+ * 绘制环形输送线--绘制创建者列表.
215
+ */
216
+ function $CircularConveyor$drawCJZList() {
217
+ //region 停止计时器
218
+ //----------------------------------------------------------------------------------------------------
219
+ kgSimulator.get$graph()?.forEach((element: Q.Node | Q.Edge) => {
220
+ if (element instanceof Q.Node && (element.properties as INodeProperty).type === NODE_KEY.CJZ && (element.properties as INodeProperty).$Creator$Timer && (element.properties as INodeProperty).$Creator$Timer != -1) {
221
+ clearTimeout((element.properties as INodeProperty).$Creator$Timer);
222
+ }
223
+ });
224
+ //----------------------------------------------------------------------------------------------------
225
+ //endregion
226
+
227
+ kgSimulator.$Env$CircularConveyor$CurrentScene?.creators?.forEach((creator) => {
228
+ const creatorNode = $CircularConveyor$drawCJZ({ creator: creator });
229
+
230
+ if (creatorNode) {
231
+ //region 开始计时器
232
+ //----------------------------------------------------------------------------------------------------
233
+ if (!creator.interval || creator.interval <= 0) {
234
+ ____ERROR____('KgSimulatorCanvas | 创建者 | 定时创建代理者 | 创建间隔 interval 非法', { creator: creator });
235
+ } else {
236
+ (creatorNode.properties as INodeProperty).$Creator$Timer = window.setTimeout(() => {
237
+ $CircularConveyor$Creator$CreateAgent({ creator: creator, creatorNode: creatorNode });
238
+ }, creator.interval);
239
+ }
240
+ //----------------------------------------------------------------------------------------------------
241
+ //endregion
242
+ }
243
+ });
244
+ }
245
+
246
+ //----------------------------------------------------------------------------------------------------
247
+ //endregion
248
+
249
+ //region 方法: 创建者--创建代理者
250
+ //----------------------------------------------------------------------------------------------------
251
+ /**
252
+ * @param param.creator 创建者.
253
+ * @param param.creatorNode 创建者节点.
254
+ */
255
+ async function $CircularConveyor$Creator$CreateAgent(param: { creator: Creator; creatorNode: Q.Node }) {
256
+ if (kgSimulator.$Mode$Simulate$IsRunning && param.creator.isEnable) {
257
+ if (kgSimulator.$Env$CircularConveyor$CurrentScene?.agents?.find((i) => isSamePoint(i.x, param.creator.x) && isSamePoint(i.y, param.creator.y))) {
258
+ // 创建者的坐标上已经有其他的代理者, 则不创建新的代理者,
259
+ } else {
260
+ try {
261
+ await httpClient().request({
262
+ data: new CreateAgentRequest({
263
+ angle: param.creator.angle,
264
+ creatorId: param.creator.id,
265
+ sceneId: param.creator.sceneId,
266
+ x: param.creator.x,
267
+ y: param.creator.y,
268
+ z: param.creator.z,
269
+ }),
270
+ method: 'POST',
271
+ url: `${kgSimulator.$Config$CircularConveyor$Api$CreateAgent}?timestamp=${timestamp()}`,
272
+ });
273
+ } catch (e: any) {
274
+ ____ERROR____(`KgSimulatorCanvas | 创建者 | 定时创建代理者 | 创建接口报错: ${e.message}`);
275
+ }
276
+ }
277
+ }
278
+ // 仿真没有运行, 或者创建者没有启用,
279
+ else {
280
+ // N/A
281
+ }
282
+
283
+ (param.creatorNode.properties as INodeProperty).$Creator$Timer = window.setTimeout(() => {
284
+ $CircularConveyor$Creator$CreateAgent(param);
285
+ }, param.creator.interval!);
286
+ }
287
+ //----------------------------------------------------------------------------------------------------
288
+ //endregion
289
+
290
+ //region 方法: 绘制「创建者」节点
291
+ //----------------------------------------------------------------------------------------------------
292
+ /**
293
+ * 绘制环形输送线--绘制创建者.
294
+ *
295
+ * @param param
296
+ * @param param.station 创建者.
297
+ */
298
+ function $CircularConveyor$drawCJZ(param: { creator: Creator }): Q.Node | null {
299
+ const lineWidth = 20;
300
+
301
+ const x = param.creator.x ?? 0;
302
+ const y = param.creator.y ?? 0;
303
+ const width = param.creator.width ?? 200;
304
+ const length = param.creator.length ?? 200;
305
+
306
+ const radiusX = width / 2 - lineWidth / 2;
307
+
308
+ const path = new Q.Path();
309
+ path.moveTo(0, -radiusX);
310
+ path.arcTo(radiusX, -radiusX, radiusX, 0, radiusX);
311
+ path.arcTo(radiusX, radiusX, 0, radiusX, radiusX);
312
+ path.arcTo(-radiusX, radiusX, -radiusX, 0, radiusX);
313
+ path.arcTo(-radiusX, -radiusX, 0, -radiusX, radiusX);
314
+ path.closePath();
315
+
316
+ const node = kgSimulator.get$graph()!.createNode(null, x, y);
317
+ node.size = new Q.Size(width, length);
318
+ node.image = path;
319
+ node.zIndex = 3;
320
+ node.movable = false;
321
+ node.selectable = true;
322
+ node.putStyles({
323
+ [Q.Styles.LINE_JOIN]: Q.Consts.LINE_JOIN_TYPE_MITER,
324
+ [Q.Styles.SHAPE_FILL_COLOR]: '#ffec3d88',
325
+ [Q.Styles.SHAPE_STROKE]: lineWidth,
326
+ [Q.Styles.SHAPE_STROKE_STYLE]: '#000000',
327
+ });
328
+ node.properties = {
329
+ $Creator$Timer: -1,
330
+ data: param.creator,
331
+ type: NODE_KEY.CJZ,
332
+ } as INodeProperty;
333
+
334
+ $CircularConveyor$drawCJZ$DrawText({ creator: param.creator, creatorNode: node });
335
+
336
+ return node;
337
+ }
338
+
339
+ //----------------------------------------------------------------------------------------------------
340
+ //endregion
341
+
342
+ //region 方法: 绘制「创建者」文本
343
+ //----------------------------------------------------------------------------------------------------
344
+ /**
345
+ * 绘制环形输送线--绘制创建者--绘制文本.
346
+ *
347
+ * @param param.creator 创建者.
348
+ * @param param.creatorNode 创建者节点.
349
+ */
350
+ function $CircularConveyor$drawCJZ$DrawText(param: { creator: Creator; creatorNode: Q.Node }): void {
351
+ const labelUI = new Q.LabelUI(param.creator.code || param.creator.id || 'NULL');
352
+
353
+ labelUI.code = NODE_UI_KEY.CJZ_CODE;
354
+ labelUI.fontSize = 192;
355
+ labelUI.position = Q.Position.CENTER_MIDDLE;
356
+ labelUI.anchorPosition = Q.Position.CENTER_MIDDLE;
357
+ labelUI.alignPosition = Q.Position.CENTER_MIDDLE;
358
+ labelUI.borderRadius = 0;
359
+ labelUI.showPointer = false;
360
+ labelUI.color = '#000000';
361
+ labelUI.syncSelection = false;
362
+
363
+ param.creatorNode.addUI(labelUI);
364
+ }
365
+ //----------------------------------------------------------------------------------------------------
366
+ //endregion
367
+
368
+ //region 方法: 绘制「销毁者」列表
369
+ //----------------------------------------------------------------------------------------------------
370
+ /**
371
+ * 绘制环形输送线--绘制销毁者列表.
372
+ */
373
+ function $CircularConveyor$drawXHZList() {
374
+ //region 停止计时器
375
+ //----------------------------------------------------------------------------------------------------
376
+ kgSimulator.get$graph()?.forEach((element: Q.Node | Q.Edge) => {
377
+ if (element instanceof Q.Node && (element.properties as INodeProperty).type === NODE_KEY.XHZ && (element.properties as INodeProperty).$Destroyer$Timer && (element.properties as INodeProperty).$Destroyer$Timer != -1) {
378
+ clearTimeout((element.properties as INodeProperty).$Destroyer$Timer);
379
+ }
380
+ });
381
+ //----------------------------------------------------------------------------------------------------
382
+ //endregion
383
+
384
+ kgSimulator.$Env$CircularConveyor$CurrentScene?.destroyers?.forEach((destroyer) => {
385
+ const destroyerNode = $CircularConveyor$drawXHZ({ destroyer: destroyer });
386
+
387
+ if (destroyerNode) {
388
+ //region 开始计时器
389
+ //----------------------------------------------------------------------------------------------------
390
+ if (!destroyer.interval || destroyer.interval <= 0) {
391
+ ____ERROR____('KgSimulatorCanvas | 销毁者 | 定时销毁代理者 | 销毁间隔 interval 非法', { destroyer: destroyer });
392
+ } else {
393
+ (destroyerNode.properties as INodeProperty).$Destroyer$Timer = window.setTimeout(() => {
394
+ circularConveyor$Destroyer$DestroyAgent({ destroyer: destroyer, destroyerNode: destroyerNode });
395
+ }, destroyer.interval);
396
+ }
397
+ //----------------------------------------------------------------------------------------------------
398
+ //endregion
399
+ }
400
+ });
401
+ }
402
+
403
+ //----------------------------------------------------------------------------------------------------
404
+ //endregion
405
+
406
+ //region 方法: 销毁者--销毁代理者
407
+ //----------------------------------------------------------------------------------------------------
408
+ /**
409
+ * @param param.destroyer 销毁者.
410
+ * @param param.destroyerNode 销毁者节点.
411
+ */
412
+ async function circularConveyor$Destroyer$DestroyAgent(param: { destroyer: Destroyer; destroyerNode: Q.Node }) {
413
+ if (kgSimulator.$Mode$Simulate$IsRunning && param.destroyer.isEnable) {
414
+ // 销毁者坐标上的代理者,
415
+ const existingAgent = kgSimulator.$Env$CircularConveyor$CurrentScene?.agents?.find((i) => isSamePoint(i.x, param.destroyer.x) && isSamePoint(i.y, param.destroyer.y));
416
+
417
+ if (!existingAgent) {
418
+ // 销毁者的坐标上尚无代理者, 则不销毁,
419
+ } else {
420
+ try {
421
+ await httpClient().request({
422
+ data: new DestroyAgentRequest({
423
+ agentId: existingAgent.code,
424
+ destroyerId: param.destroyer.id,
425
+ }),
426
+ method: 'POST',
427
+ url: `${kgSimulator.$Config$CircularConveyor$Api$DestroyAgent}?timestamp=${timestamp()}`,
428
+ });
429
+ } catch (e: any) {
430
+ ____ERROR____(`KgSimulatorCanvas | 销毁者 | 定时销毁代理者 | 销毁接口报错: ${e.message}`);
431
+ }
432
+ }
433
+ } else {
434
+ // 仿真没有运行, 或者销毁者没有启用,
435
+ }
436
+
437
+ (param.destroyerNode.properties as INodeProperty).$Destroyer$Timer = window.setTimeout(() => {
438
+ circularConveyor$Destroyer$DestroyAgent(param);
439
+ }, param.destroyer.interval!);
440
+ }
441
+ //----------------------------------------------------------------------------------------------------
442
+ //endregion
443
+
444
+ //region 方法: 绘制「销毁者」节点
445
+ //----------------------------------------------------------------------------------------------------
446
+ /**
447
+ * 绘制环形输送线--绘制销毁者.
448
+ *
449
+ * @param param
450
+ * @param param.destroyer 销毁者.
451
+ */
452
+ function $CircularConveyor$drawXHZ(param: { destroyer: Destroyer }): Q.Node | null {
453
+ const lineWidth = 20;
454
+
455
+ const x = param.destroyer.x ?? 0;
456
+ const y = param.destroyer.y ?? 0;
457
+ const width = param.destroyer.width ?? 200;
458
+ const length = param.destroyer.length ?? 200;
459
+
460
+ const radiusX = width / 2 - lineWidth / 2;
461
+
462
+ const path = new Q.Path();
463
+ path.moveTo(0, -radiusX);
464
+ path.arcTo(radiusX, -radiusX, radiusX, 0, radiusX);
465
+ path.arcTo(radiusX, radiusX, 0, radiusX, radiusX);
466
+ path.arcTo(-radiusX, radiusX, -radiusX, 0, radiusX);
467
+ path.arcTo(-radiusX, -radiusX, 0, -radiusX, radiusX);
468
+ path.closePath();
469
+
470
+ const node = kgSimulator.get$graph()!.createNode(null, x, y);
471
+ node.size = new Q.Size(width, length);
472
+ node.image = path;
473
+ node.zIndex = 3;
474
+ node.movable = false;
475
+ node.selectable = true;
476
+ node.putStyles({
477
+ [Q.Styles.LINE_JOIN]: Q.Consts.LINE_JOIN_TYPE_MITER,
478
+ [Q.Styles.SHAPE_FILL_COLOR]: '#ff4d4f88',
479
+ [Q.Styles.SHAPE_STROKE]: lineWidth,
480
+ [Q.Styles.SHAPE_STROKE_STYLE]: '#000000',
481
+ });
482
+ node.properties = {
483
+ data: param.destroyer,
484
+ type: NODE_KEY.XHZ,
485
+ } as INodeProperty;
486
+
487
+ $CircularConveyor$drawXHZ$DrawText({ destroyer: param.destroyer, destroyerNode: node });
488
+
489
+ return node;
490
+ }
491
+
492
+ //----------------------------------------------------------------------------------------------------
493
+ //endregion
494
+
495
+ //region 方法: 绘制「销毁者」文本
496
+ //----------------------------------------------------------------------------------------------------
497
+ /**
498
+ * 绘制环形输送线--绘制销毁者--绘制文本.
499
+ *
500
+ * @param param.destroyer 销毁者.
501
+ * @param param.destroyerNode 销毁者节点.
502
+ */
503
+ function $CircularConveyor$drawXHZ$DrawText(param: { destroyer: Destroyer; destroyerNode: Q.Node }): void {
504
+ const labelUI = new Q.LabelUI(param.destroyer.code || param.destroyer.id || 'NULL');
505
+
506
+ labelUI.code = NODE_UI_KEY.XHZ_CODE;
507
+ labelUI.fontSize = 192;
508
+ labelUI.position = Q.Position.CENTER_MIDDLE;
509
+ labelUI.anchorPosition = Q.Position.CENTER_MIDDLE;
510
+ labelUI.alignPosition = Q.Position.CENTER_MIDDLE;
511
+ labelUI.borderRadius = 0;
512
+ labelUI.showPointer = false;
513
+ labelUI.color = '#000000';
514
+ labelUI.syncSelection = false;
515
+
516
+ param.destroyerNode.addUI(labelUI);
517
+ }
518
+ //----------------------------------------------------------------------------------------------------
519
+ //endregion
520
+
521
+ //region 方法: 绘制「输送机」列表
522
+ //----------------------------------------------------------------------------------------------------
523
+ /**
524
+ * 绘制环形输送线--绘制输送机列表.
525
+ */
526
+ function $CircularConveyor$drawSSJList() {
527
+ kgSimulator.$Env$CircularConveyor$CurrentScene?.stations?.forEach((station) => {
528
+ $CircularConveyor$drawSSJ({ ptssj: station });
529
+ });
530
+ }
531
+
532
+ //----------------------------------------------------------------------------------------------------
533
+ //endregion
534
+
535
+ //region 方法: 绘制「输送机」节点
536
+ //----------------------------------------------------------------------------------------------------
537
+ /**
538
+ * 绘制环形输送线--绘制输送机.
539
+ *
540
+ * @param param
541
+ * @param param.station 输送机.
542
+ */
543
+ function $CircularConveyor$drawSSJ(param: { ptssj: Station }): Q.Node | null {
544
+ const lineWidth = 20;
545
+
546
+ const x = param.ptssj.x ?? 0;
547
+ const y = param.ptssj.y ?? 0;
548
+ const width = param.ptssj.width ?? 200;
549
+ const length = param.ptssj.length ?? 200;
550
+
551
+ const path = new Q.Path();
552
+ path.moveTo(-(width / 2 - lineWidth / 2), -(length / 2 - lineWidth / 2));
553
+ path.lineTo(width / 2 - lineWidth / 2, -(length / 2 - lineWidth / 2));
554
+ path.lineTo(width / 2 - lineWidth / 2, length / 2 - lineWidth / 2);
555
+ path.lineTo(-(width / 2 - lineWidth / 2), length / 2 - lineWidth / 2);
556
+ path.closePath();
557
+
558
+ const node = kgSimulator.get$graph()!.createNode(null, x, y);
559
+ node.size = new Q.Size(width, length);
560
+ node.image = path;
561
+ node.zIndex = 1;
562
+ node.movable = true;
563
+ node.selectable = true;
564
+ node.putStyles({
565
+ [Q.Styles.LINE_JOIN]: Q.Consts.LINE_JOIN_TYPE_MITER,
566
+ [Q.Styles.SHAPE_FILL_COLOR]: '#4CAF50',
567
+ [Q.Styles.SHAPE_STROKE]: lineWidth,
568
+ [Q.Styles.SHAPE_STROKE_STYLE]: '#000000',
569
+ });
570
+ node.properties = {
571
+ data: param.ptssj,
572
+ type: NODE_KEY.SSJ,
573
+ } as INodeProperty;
574
+
575
+ $CircularConveyor$drawSSJ$DrawText({ ptssj: param.ptssj, ptssjNode: node });
576
+
577
+ return node;
578
+ }
579
+
580
+ //----------------------------------------------------------------------------------------------------
581
+ //endregion
582
+
583
+ //region 方法: 绘制「输送机」文本
584
+ //----------------------------------------------------------------------------------------------------
585
+ /**
586
+ * 绘制环形输送线--绘制输送机--绘制文本.
587
+ *
588
+ * @param param.ptssj 输送机.
589
+ * @param param.ptssjNode 输送机节点.
590
+ */
591
+ function $CircularConveyor$drawSSJ$DrawText(param: { ptssj: Station; ptssjNode: Q.Node }): void {
592
+ const labelUI = new Q.LabelUI(param.ptssj.code || param.ptssj.id || 'NULL');
593
+
594
+ labelUI.code = NODE_UI_KEY.SSJ_CODE;
595
+ labelUI.fontSize = 256;
596
+ labelUI.position = Q.Position.LEFT_TOP;
597
+ labelUI.anchorPosition = Q.Position.LEFT_TOP;
598
+ labelUI.alignPosition = Q.Position.LEFT_TOP;
599
+ labelUI.borderRadius = 0;
600
+ labelUI.showPointer = false;
601
+ labelUI.color = '#000000';
602
+ labelUI.syncSelection = false;
603
+ labelUI.offsetX = 20 * 2;
604
+ labelUI.offsetY = 20 * 2;
605
+
606
+ param.ptssjNode.addUI(labelUI);
607
+ }
608
+ //----------------------------------------------------------------------------------------------------
609
+ //endregion
610
+
611
+ //region 方法: 绘制「移栽机」列表
612
+ //----------------------------------------------------------------------------------------------------
613
+ /**
614
+ * 绘制环形输送线--绘制移栽机列表.
615
+ */
616
+ function $CircularConveyor$drawYZJList() {
617
+ kgSimulator.$Env$CircularConveyor$CurrentScene?.jackUpTransferStations?.forEach((yzj) => {
618
+ $CircularConveyor$drawYZJ({ dsyzj: yzj });
619
+ });
620
+ }
621
+
622
+ //----------------------------------------------------------------------------------------------------
623
+ //endregion
624
+
625
+ //region 方法: 绘制「移栽机」节点
626
+ //----------------------------------------------------------------------------------------------------
627
+ /**
628
+ * 绘制环形输送线--绘制移栽机.
629
+ *
630
+ * @param param
631
+ * @param param.dsyzj 移栽机.
632
+ */
633
+ function $CircularConveyor$drawYZJ(param: { dsyzj: JackUpTransferStation }): Q.Node | null {
634
+ const lineWidth = 20;
635
+
636
+ const x = param.dsyzj.x ?? 0;
637
+ const y = param.dsyzj.y ?? 0;
638
+ const width = param.dsyzj.width ?? 200;
639
+ const length = param.dsyzj.length ?? 200;
640
+
641
+ const path = new Q.Path();
642
+ path.moveTo(-(width / 2 - lineWidth / 2), -(length / 2 - lineWidth / 2));
643
+ path.lineTo(width / 2 - lineWidth / 2, -(length / 2 - lineWidth / 2));
644
+ path.lineTo(width / 2 - lineWidth / 2, length / 2 - lineWidth / 2);
645
+ path.lineTo(-(width / 2 - lineWidth / 2), length / 2 - lineWidth / 2);
646
+ path.closePath();
647
+
648
+ const node = kgSimulator.get$graph()!.createNode(null, x, y);
649
+ node.size = new Q.Size(width, length);
650
+ node.image = path;
651
+ node.zIndex = 1;
652
+ node.movable = true;
653
+ node.selectable = true;
654
+ node.putStyles({
655
+ [Q.Styles.LINE_JOIN]: Q.Consts.LINE_JOIN_TYPE_MITER,
656
+ [Q.Styles.SHAPE_FILL_COLOR]: '#ece2fe',
657
+ [Q.Styles.SHAPE_STROKE]: lineWidth,
658
+ [Q.Styles.SHAPE_STROKE_STYLE]: '#000000',
659
+ });
660
+ node.properties = {
661
+ $YZJ$CurrentPosition: 'UP',
662
+ $YZJ$IsDownDoing: false,
663
+ $YZJ$IsUpDoing: false,
664
+ data: param.dsyzj,
665
+ type: NODE_KEY.YZJ,
666
+ } as INodeProperty;
667
+
668
+ $CircularConveyor$drawYZJ$DrawText({ dsyzj: param.dsyzj, dsyzjNode: node });
669
+
670
+ if (kgSimulator.$Mode$IsMonitor || kgSimulator.$Mode$IsSimulate) {
671
+ $CircularConveyor$drawYZJ$DrawUpArrow({ dsyzj: param.dsyzj, dsyzjNode: node });
672
+ $CircularConveyor$drawYZJ$DrawDownArrow({ dsyzj: param.dsyzj, dsyzjNode: node });
673
+ }
674
+
675
+ return node;
676
+ }
677
+
678
+ //----------------------------------------------------------------------------------------------------
679
+ //endregion
680
+
681
+ //region 方法: 绘制「移栽机」文本
682
+ //----------------------------------------------------------------------------------------------------
683
+ /**
684
+ * 绘制环形输送线--绘制移栽机--绘制文本.
685
+ *
686
+ * @param param.dsyzj 移栽机.
687
+ * @param param.dsyzjNode 移栽机节点.
688
+ */
689
+ function $CircularConveyor$drawYZJ$DrawText(param: { dsyzj: JackUpTransferStation; dsyzjNode: Q.Node }): void {
690
+ const labelUI = new Q.LabelUI(param.dsyzj.code || param.dsyzj.id || 'NULL');
691
+
692
+ labelUI.code = NODE_UI_KEY.YZJ_CODE;
693
+ labelUI.fontSize = 256;
694
+ labelUI.position = Q.Position.LEFT_TOP;
695
+ labelUI.anchorPosition = Q.Position.LEFT_TOP;
696
+ labelUI.alignPosition = Q.Position.LEFT_TOP;
697
+ labelUI.borderRadius = 0;
698
+ labelUI.showPointer = false;
699
+ labelUI.color = '#000000';
700
+ labelUI.syncSelection = false;
701
+ labelUI.offsetX = 20 * 2;
702
+ labelUI.offsetY = 20 * 2;
703
+
704
+ param.dsyzjNode.addUI(labelUI);
705
+ }
706
+ //----------------------------------------------------------------------------------------------------
707
+ //endregion
708
+
709
+ //region 方法: 绘制「移栽机」上升箭头
710
+ //----------------------------------------------------------------------------------------------------
711
+ /**
712
+ * 绘制环形输送线--绘制移栽机--绘制上升箭头.
713
+ *
714
+ * @param param.dsyzj 移栽机.
715
+ * @param param.dsyzjNode 移栽机节点.
716
+ */
717
+ function $CircularConveyor$drawYZJ$DrawUpArrow(param: { dsyzj: JackUpTransferStation; dsyzjNode: Q.Node }): void {
718
+ const lineWidth = 20;
719
+
720
+ const path = new Q.Path();
721
+ path.lineJoin = Q.Consts.LINE_JOIN_TYPE_MITER;
722
+ path.lineCap = Q.Consts.LINE_CAP_TYPE_SQUARE;
723
+
724
+ path.moveTo(lineWidth * 10, 0);
725
+ path.lineTo(lineWidth * 10, lineWidth * 30);
726
+ path.closePath();
727
+
728
+ path.moveTo(lineWidth * 10, 0);
729
+ path.lineTo(0, lineWidth * 20);
730
+ path.lineTo(lineWidth * 20, lineWidth * 20);
731
+ path.lineTo(lineWidth * 10, 0);
732
+ path.closePath();
733
+
734
+ const imageUI = new Q.ImageUI(path);
735
+ imageUI.code = NODE_UI_KEY.YZJ_UP_ARROW;
736
+ imageUI.visible = false;
737
+ imageUI.syncSelection = false;
738
+ imageUI.anchorPosition = Q.Position.RIGHT_TOP;
739
+ imageUI.position = Q.Position.RIGHT_TOP;
740
+ imageUI.strokeStyle = '#9254de';
741
+ imageUI.fillColor = '#9254de';
742
+ imageUI.lineWidth = lineWidth;
743
+ imageUI.offsetX = -lineWidth * 3;
744
+ imageUI.offsetY = lineWidth * 3;
745
+
746
+ param.dsyzjNode.addUI(imageUI);
747
+ }
748
+ //----------------------------------------------------------------------------------------------------
749
+ //endregion
750
+
751
+ //region 方法: 绘制「移栽机」下降箭头
752
+ //----------------------------------------------------------------------------------------------------
753
+ /**
754
+ * 绘制环形输送线--绘制移栽机--绘制下降箭头.
755
+ *
756
+ * @param param.dsyzj 移栽机.
757
+ * @param param.dsyzjNode 移栽机节点.
758
+ */
759
+ function $CircularConveyor$drawYZJ$DrawDownArrow(param: { dsyzj: JackUpTransferStation; dsyzjNode: Q.Node }): void {
760
+ const lineWidth = 20;
761
+
762
+ const path = new Q.Path();
763
+ path.lineJoin = Q.Consts.LINE_JOIN_TYPE_MITER;
764
+ path.lineCap = Q.Consts.LINE_CAP_TYPE_SQUARE;
765
+
766
+ path.moveTo(lineWidth * 10, 0);
767
+ path.lineTo(lineWidth * 10, lineWidth * 30);
768
+ path.closePath();
769
+
770
+ path.moveTo(lineWidth * 10, 0);
771
+ path.lineTo(0, lineWidth * 20);
772
+ path.lineTo(lineWidth * 20, lineWidth * 20);
773
+ path.lineTo(lineWidth * 10, 0);
774
+ path.closePath();
775
+
776
+ const imageUI = new Q.ImageUI(path);
777
+ imageUI.code = NODE_UI_KEY.YZJ_DOWN_ARROW;
778
+ imageUI.visible = false;
779
+ imageUI.syncSelection = false;
780
+ imageUI.anchorPosition = Q.Position.RIGHT_TOP;
781
+ imageUI.position = Q.Position.RIGHT_TOP;
782
+ imageUI.strokeStyle = '#36cfc9';
783
+ imageUI.fillColor = '#36cfc9';
784
+ imageUI.lineWidth = lineWidth;
785
+ imageUI.offsetX = -lineWidth * 24;
786
+ imageUI.offsetY = lineWidth * 33;
787
+ imageUI.rotate = (Math.PI / 180) * 180;
788
+
789
+ param.dsyzjNode.addUI(imageUI);
790
+ }
791
+ //----------------------------------------------------------------------------------------------------
792
+ //endregion
793
+
794
+ //region 方法: 绘制「叠盘机」列表
795
+ //----------------------------------------------------------------------------------------------------
796
+ /**
797
+ * 绘制环形输送线--绘制叠盘机列表.
798
+ */
799
+ function $CircularConveyor$drawDPJList() {
800
+ kgSimulator.$Env$CircularConveyor$CurrentScene?.palletStackerStations?.forEach((dpj) => {
801
+ $CircularConveyor$drawDPJ({ dpj: dpj });
802
+ });
803
+ }
804
+
805
+ //----------------------------------------------------------------------------------------------------
806
+ //endregion
807
+
808
+ //region 方法: 绘制「叠盘机」节点
809
+ //----------------------------------------------------------------------------------------------------
810
+ /**
811
+ * 绘制环形输送线--绘制叠盘机.
812
+ *
813
+ * @param param
814
+ * @param param.dpj 叠盘机.
815
+ */
816
+ function $CircularConveyor$drawDPJ(param: { dpj: PalletStackerStation }): Q.Node | null {
817
+ const lineWidth = 20;
818
+
819
+ const x = param.dpj.x ?? 0;
820
+ const y = param.dpj.y ?? 0;
821
+ const width = param.dpj.width ?? 200;
822
+ const length = param.dpj.length ?? 200;
823
+
824
+ //region 「叠盘机」下面的「输送机」
825
+ // 叠盘机正下方有一个输送机, 为了避免输送机被叠盘机完全覆盖, 因此调整输送机的文本位置,
826
+ //----------------------------------------------------------------------------------------------------
827
+ const ptssjNode = kgSimulator.get$graph()!.graphModel.datas.find((i) => i instanceof Q.Node && i.x === x && i.y === y);
828
+ if (ptssjNode) {
829
+ const labelUI = getNodeUiByCode<Q.LabelUI>({ code: NODE_UI_KEY.SSJ_CODE, node: ptssjNode });
830
+ if (labelUI) {
831
+ labelUI.ui.showOnTop = true;
832
+ labelUI.ui.offsetY = lineWidth * 14;
833
+ }
834
+ }
835
+ //----------------------------------------------------------------------------------------------------
836
+ //endregion
837
+
838
+ const path = new Q.Path();
839
+ path.moveTo(-(width / 2 - lineWidth / 2), -(length / 2 - lineWidth / 2));
840
+ path.lineTo(width / 2 - lineWidth / 2, -(length / 2 - lineWidth / 2));
841
+ path.lineTo(width / 2 - lineWidth / 2, length / 2 - lineWidth / 2);
842
+ path.lineTo(-(width / 2 - lineWidth / 2), length / 2 - lineWidth / 2);
843
+ path.closePath();
844
+
845
+ const dpjNode = kgSimulator.get$graph()!.createNode(null, x, y);
846
+ dpjNode.size = new Q.Size(width, length);
847
+ dpjNode.image = path;
848
+ dpjNode.zIndex = 2;
849
+ dpjNode.movable = true;
850
+ dpjNode.selectable = true;
851
+ dpjNode.putStyles({
852
+ [Q.Styles.LINE_JOIN]: Q.Consts.LINE_JOIN_TYPE_MITER,
853
+ [Q.Styles.SHAPE_FILL_COLOR]: '#7EDAFB',
854
+ [Q.Styles.SHAPE_STROKE]: lineWidth,
855
+ [Q.Styles.SHAPE_STROKE_STYLE]: '#000000',
856
+ });
857
+ dpjNode.properties = {
858
+ data: param.dpj,
859
+ type: NODE_KEY.DPJ,
860
+ } as INodeProperty;
861
+
862
+ $CircularConveyor$drawDPJ$DrawText({ dpj: param.dpj, dpjNode: dpjNode });
863
+
864
+ if (kgSimulator.$Mode$IsMonitor || kgSimulator.$Mode$IsSimulate) {
865
+ $CircularConveyor$drawDPJ$DrawInArrow({ dpj: param.dpj, dpjNode: dpjNode });
866
+ $CircularConveyor$drawDPJ$DrawOutArrow({ dpj: param.dpj, dpjNode: dpjNode });
867
+ }
868
+
869
+ return dpjNode;
870
+ }
871
+
872
+ //----------------------------------------------------------------------------------------------------
873
+ //endregion
874
+
875
+ //region 方法: 绘制「叠盘机」文本
876
+ //----------------------------------------------------------------------------------------------------
877
+ /**
878
+ * 绘制环形输送线--绘制叠盘机--绘制文本.
879
+ *
880
+ * @param param.dpj 叠盘机.
881
+ * @param param.dpjNode 叠盘机节点.
882
+ */
883
+ function $CircularConveyor$drawDPJ$DrawText(param: { dpj: PalletStackerStation; dpjNode: Q.Node }): void {
884
+ const labelUI = new Q.LabelUI(param.dpj.code || param.dpj.id || 'NULL');
885
+
886
+ labelUI.code = NODE_UI_KEY.DPJ_CODE;
887
+ labelUI.fontSize = 256;
888
+ labelUI.position = Q.Position.LEFT_TOP;
889
+ labelUI.anchorPosition = Q.Position.LEFT_TOP;
890
+ labelUI.alignPosition = Q.Position.LEFT_TOP;
891
+ labelUI.borderRadius = 0;
892
+ labelUI.showPointer = false;
893
+ labelUI.color = '#000000';
894
+ labelUI.syncSelection = false;
895
+ labelUI.offsetX = 20 * 2;
896
+ labelUI.offsetY = 20 * 2;
897
+
898
+ param.dpjNode.addUI(labelUI);
899
+ }
900
+ //----------------------------------------------------------------------------------------------------
901
+ //endregion
902
+
903
+ //region 方法: 绘制「叠盘机」叠盘箭头
904
+ //----------------------------------------------------------------------------------------------------
905
+ /**
906
+ * 绘制环形输送线--绘制叠盘机--绘制叠盘箭头.
907
+ *
908
+ * @param param.dpj 叠盘机.
909
+ * @param param.dpjNode 叠盘机节点.
910
+ */
911
+ function $CircularConveyor$drawDPJ$DrawInArrow(param: { dpj: PalletStackerStation; dpjNode: Q.Node }): void {
912
+ const lineWidth = 20;
913
+
914
+ const path = new Q.Path();
915
+ path.lineJoin = Q.Consts.LINE_JOIN_TYPE_MITER;
916
+ path.lineCap = Q.Consts.LINE_CAP_TYPE_SQUARE;
917
+
918
+ path.moveTo(lineWidth * 10, 0);
919
+ path.lineTo(lineWidth * 10, lineWidth * 30);
920
+ path.closePath();
921
+
922
+ path.moveTo(lineWidth * 10, 0);
923
+ path.lineTo(0, lineWidth * 20);
924
+ path.lineTo(lineWidth * 20, lineWidth * 20);
925
+ path.lineTo(lineWidth * 10, 0);
926
+ path.closePath();
927
+
928
+ const imageUI = new Q.ImageUI(path);
929
+ imageUI.code = NODE_UI_KEY.DPJ_IN_ARROW;
930
+ imageUI.visible = false;
931
+ imageUI.syncSelection = false;
932
+ imageUI.anchorPosition = Q.Position.RIGHT_TOP;
933
+ imageUI.position = Q.Position.RIGHT_TOP;
934
+ imageUI.strokeStyle = '#9254de';
935
+ imageUI.fillColor = '#9254de';
936
+ imageUI.lineWidth = lineWidth;
937
+ imageUI.offsetX = -lineWidth * 3;
938
+ imageUI.offsetY = lineWidth * 3;
939
+
940
+ param.dpjNode.addUI(imageUI);
941
+ }
942
+ //----------------------------------------------------------------------------------------------------
943
+ //endregion
944
+
945
+ //region 方法: 绘制「叠盘机」拆盘箭头
946
+ //----------------------------------------------------------------------------------------------------
947
+ /**
948
+ * 绘制环形输送线--绘制叠盘机--绘制拆盘箭头.
949
+ *
950
+ * @param param.dpj 叠盘机.
951
+ * @param param.dpjNode 叠盘机节点.
952
+ */
953
+ function $CircularConveyor$drawDPJ$DrawOutArrow(param: { dpj: PalletStackerStation; dpjNode: Q.Node }): void {
954
+ const lineWidth = 20;
955
+
956
+ const path = new Q.Path();
957
+ path.lineJoin = Q.Consts.LINE_JOIN_TYPE_MITER;
958
+ path.lineCap = Q.Consts.LINE_CAP_TYPE_SQUARE;
959
+
960
+ path.moveTo(lineWidth * 10, 0);
961
+ path.lineTo(lineWidth * 10, lineWidth * 30);
962
+ path.closePath();
963
+
964
+ path.moveTo(lineWidth * 10, 0);
965
+ path.lineTo(0, lineWidth * 20);
966
+ path.lineTo(lineWidth * 20, lineWidth * 20);
967
+ path.lineTo(lineWidth * 10, 0);
968
+ path.closePath();
969
+
970
+ const imageUI = new Q.ImageUI(path);
971
+ imageUI.code = NODE_UI_KEY.DPJ_OUT_ARROW;
972
+ imageUI.visible = false;
973
+ imageUI.syncSelection = false;
974
+ imageUI.anchorPosition = Q.Position.RIGHT_TOP;
975
+ imageUI.position = Q.Position.RIGHT_TOP;
976
+ imageUI.strokeStyle = '#36cfc9';
977
+ imageUI.fillColor = '#36cfc9';
978
+ imageUI.lineWidth = lineWidth;
979
+ imageUI.offsetX = -lineWidth * 24;
980
+ imageUI.offsetY = lineWidth * 33;
981
+ imageUI.rotate = (Math.PI / 180) * 180;
982
+
983
+ param.dpjNode.addUI(imageUI);
984
+ }
985
+ //----------------------------------------------------------------------------------------------------
986
+ //endregion
987
+
988
+ //region 方法: 绘制默认的「传感器」列表
989
+ //----------------------------------------------------------------------------------------------------
990
+ /**
991
+ * 绘制环形输送线--绘制默认的传感器列表.
992
+ */
993
+ function $CircularConveyor$drawDefaultCGQList() {
994
+ kgSimulator.get$graph()!.graphModel.datas.forEach((element) => {
995
+ if (element instanceof Q.Node) {
996
+ // 「输送机」
997
+ if ((element.properties as INodeProperty).type === NODE_KEY.SSJ) {
998
+ let isToUp = false;
999
+ let isToDown = false;
1000
+ let isToLeft = false;
1001
+ let isToRight = false;
1002
+
1003
+ element.forEachEdge((edge: Q.Edge) => {
1004
+ const station = (element.properties as INodeProperty).data as Station;
1005
+
1006
+ switch (true) {
1007
+ case edge.from.x === edge.to.x && edge.from.y < edge.to.y: {
1008
+ isToUp = true;
1009
+ break;
1010
+ }
1011
+
1012
+ case edge.from.x === edge.to.x && edge.from.y > edge.to.y: {
1013
+ isToDown = true;
1014
+ break;
1015
+ }
1016
+
1017
+ case edge.from.x > edge.to.x && edge.from.y === edge.to.y: {
1018
+ isToLeft = true;
1019
+ break;
1020
+ }
1021
+
1022
+ case edge.from.x < edge.to.x && edge.from.y === edge.to.y: {
1023
+ isToRight = true;
1024
+ break;
1025
+ }
1026
+ }
1027
+
1028
+ const gdcgq = new PhotoelectricSensor({
1029
+ angle: 0,
1030
+ code: '',
1031
+ height: 0,
1032
+ id: '',
1033
+ length: 0,
1034
+ priority: 0,
1035
+ sceneId: station.sceneId,
1036
+ startOffset: 0,
1037
+ stationId: station.id,
1038
+ status: 0,
1039
+ type: 0,
1040
+ width: 0,
1041
+ x: 0,
1042
+ y: 0,
1043
+ z: 0,
1044
+ });
1045
+
1046
+ if (isToUp) {
1047
+ $CircularConveyor$drawCGQ({
1048
+ gdcgq: {
1049
+ ...gdcgq,
1050
+ id: KgUtil.uuid(),
1051
+ length: 20,
1052
+ width: station.width! + 20,
1053
+ x: element.x,
1054
+ y:
1055
+ element.y +
1056
+ station.length! / 2 -
1057
+ (station.isLongDistanceSensorOnY ? kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$LongDistance : kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance),
1058
+ },
1059
+ });
1060
+ }
1061
+
1062
+ if (isToDown) {
1063
+ $CircularConveyor$drawCGQ({
1064
+ gdcgq: {
1065
+ ...gdcgq,
1066
+ id: KgUtil.uuid(),
1067
+ length: 20,
1068
+ width: station.width! + 20,
1069
+ x: element.x,
1070
+ y:
1071
+ element.y -
1072
+ station.length! / 2 +
1073
+ (station.isLongDistanceSensorOnY ? kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$LongDistance : kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance),
1074
+ },
1075
+ });
1076
+ }
1077
+
1078
+ if (isToLeft) {
1079
+ $CircularConveyor$drawCGQ({
1080
+ gdcgq: {
1081
+ ...gdcgq,
1082
+ id: KgUtil.uuid(),
1083
+ length: station.length! + 20,
1084
+ width: 20,
1085
+ x:
1086
+ element.x -
1087
+ station.width! / 2 +
1088
+ (station.isLongDistanceSensorOnX ? kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$LongDistance : kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance),
1089
+ y: element.y,
1090
+ },
1091
+ });
1092
+ }
1093
+
1094
+ if (isToRight) {
1095
+ $CircularConveyor$drawCGQ({
1096
+ gdcgq: {
1097
+ ...gdcgq,
1098
+ id: KgUtil.uuid(),
1099
+ length: station.length! + 20,
1100
+ width: 20,
1101
+ x:
1102
+ element.x +
1103
+ station.width! / 2 -
1104
+ (station.isLongDistanceSensorOnX ? kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$LongDistance : kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance),
1105
+ y: element.y,
1106
+ },
1107
+ });
1108
+ }
1109
+ });
1110
+ }
1111
+
1112
+ // 「移栽机」
1113
+ if ((element.properties as INodeProperty).type === NODE_KEY.YZJ) {
1114
+ let isToUp = false;
1115
+ let isToDown = false;
1116
+ let isToLeft = false;
1117
+ let isToRight = false;
1118
+
1119
+ element.forEachEdge((edge: Q.Edge) => {
1120
+ const dsyzj = (element.properties as INodeProperty).data as JackUpTransferStation;
1121
+
1122
+ switch (true) {
1123
+ case edge.from.x === edge.to.x && edge.from.y < edge.to.y: {
1124
+ isToUp = true;
1125
+ break;
1126
+ }
1127
+
1128
+ case edge.from.x === edge.to.x && edge.from.y > edge.to.y: {
1129
+ isToDown = true;
1130
+ break;
1131
+ }
1132
+
1133
+ case edge.from.x > edge.to.x && edge.from.y === edge.to.y: {
1134
+ isToLeft = true;
1135
+ break;
1136
+ }
1137
+
1138
+ case edge.from.x < edge.to.x && edge.from.y === edge.to.y: {
1139
+ isToRight = true;
1140
+ break;
1141
+ }
1142
+ }
1143
+
1144
+ const gdcgq = new PhotoelectricSensor({
1145
+ angle: 0,
1146
+ code: '',
1147
+ height: 0,
1148
+ id: '',
1149
+ length: 0,
1150
+ priority: 0,
1151
+ sceneId: dsyzj.sceneId,
1152
+ startOffset: 0,
1153
+ stationId: dsyzj.id,
1154
+ status: 0,
1155
+ type: 0,
1156
+ width: 0,
1157
+ x: 0,
1158
+ y: 0,
1159
+ z: 0,
1160
+ });
1161
+
1162
+ if (isToUp) {
1163
+ $CircularConveyor$drawCGQ({
1164
+ gdcgq: {
1165
+ ...gdcgq,
1166
+ id: KgUtil.uuid(),
1167
+ length: 20,
1168
+ width: dsyzj.width! + 20,
1169
+ x: element.x,
1170
+ y: element.y + dsyzj.length! / 2 - kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance,
1171
+ },
1172
+ });
1173
+ }
1174
+
1175
+ if (isToDown) {
1176
+ $CircularConveyor$drawCGQ({
1177
+ gdcgq: {
1178
+ ...gdcgq,
1179
+ id: KgUtil.uuid(),
1180
+ length: 20,
1181
+ width: dsyzj.width! + 20,
1182
+ x: element.x,
1183
+ y: element.y - dsyzj.length! / 2 + kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance,
1184
+ },
1185
+ });
1186
+ }
1187
+
1188
+ if (isToLeft) {
1189
+ $CircularConveyor$drawCGQ({
1190
+ gdcgq: {
1191
+ ...gdcgq,
1192
+ id: KgUtil.uuid(),
1193
+ length: dsyzj.length! + 20,
1194
+ width: 20,
1195
+ x: element.x - dsyzj.width! / 2 + kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance,
1196
+ y: element.y,
1197
+ },
1198
+ });
1199
+ }
1200
+
1201
+ if (isToRight) {
1202
+ $CircularConveyor$drawCGQ({
1203
+ gdcgq: {
1204
+ ...gdcgq,
1205
+ id: KgUtil.uuid(),
1206
+ length: dsyzj.length! + 20,
1207
+ width: 20,
1208
+ x: element.x + dsyzj.width! / 2 - kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance,
1209
+ y: element.y,
1210
+ },
1211
+ });
1212
+ }
1213
+ });
1214
+ }
1215
+ }
1216
+ });
1217
+ }
1218
+ //----------------------------------------------------------------------------------------------------
1219
+ //endregion
1220
+
1221
+ //region 方法: 绘制「传感器」列表
1222
+ //----------------------------------------------------------------------------------------------------
1223
+ /**
1224
+ * 绘制环形输送线--绘制传感器列表.
1225
+ */
1226
+ function $CircularConveyor$drawCGQList() {
1227
+ kgSimulator.$Env$CircularConveyor$CurrentScene?.photoelectricSensors?.forEach((gdcgq) => {
1228
+ $CircularConveyor$drawCGQ({ gdcgq: gdcgq });
1229
+ });
1230
+ }
1231
+ //----------------------------------------------------------------------------------------------------
1232
+ //endregion
1233
+
1234
+ //region 方法: 绘制「传感器」节点
1235
+ //----------------------------------------------------------------------------------------------------
1236
+ /**
1237
+ * 绘制环形输送线--绘制传感器.
1238
+ *
1239
+ * @param param
1240
+ * @param param.gdcgq 传感器.
1241
+ */
1242
+ function $CircularConveyor$drawCGQ(param: { gdcgq: PhotoelectricSensor }): Q.Node | null {
1243
+ const lineWidth = 20;
1244
+
1245
+ const x = param.gdcgq.x ?? 0;
1246
+ const y = param.gdcgq.y ?? 0;
1247
+ const width = param.gdcgq.width ?? 200;
1248
+ const length = param.gdcgq.length ?? lineWidth;
1249
+
1250
+ const path = new Q.Path();
1251
+ path.moveTo(-(width / 2 - lineWidth / 2), -(length / 2 - lineWidth / 2));
1252
+ path.lineTo(width / 2 - lineWidth / 2, -(length / 2 - lineWidth / 2));
1253
+ path.lineTo(width / 2 - lineWidth / 2, length / 2 - lineWidth / 2);
1254
+ path.lineTo(-(width / 2 - lineWidth / 2), length / 2 - lineWidth / 2);
1255
+ path.closePath();
1256
+
1257
+ const node = kgSimulator.get$graph()!.createNode(null, x, y);
1258
+ node.size = new Q.Size(width, length);
1259
+ node.image = path;
1260
+ node.zIndex = 4;
1261
+ node.movable = true;
1262
+ node.selectable = true;
1263
+ node.putStyles({
1264
+ [Q.Styles.LINE_JOIN]: Q.Consts.LINE_JOIN_TYPE_MITER,
1265
+ [Q.Styles.SHAPE_FILL_COLOR]: '#ff0000',
1266
+ [Q.Styles.SHAPE_STROKE]: lineWidth,
1267
+ [Q.Styles.SHAPE_STROKE_STYLE]: '#ff0000',
1268
+ });
1269
+ node.properties = {
1270
+ data: param.gdcgq,
1271
+ type: NODE_KEY.CGQ,
1272
+ } as INodeProperty;
1273
+
1274
+ return node;
1275
+ }
1276
+
1277
+ //----------------------------------------------------------------------------------------------------
1278
+ //endregion
1279
+
1280
+ //region 方法: 绘制「连线」列表
1281
+ //----------------------------------------------------------------------------------------------------
1282
+ /**
1283
+ * 绘制环形输送线--绘制连线列表.
1284
+ */
1285
+ function $CircularConveyor$drawEdgeList() {
1286
+ kgSimulator.$Env$CircularConveyor$CurrentScene?.edges?.forEach((edge) => {
1287
+ $CircularConveyor$drawEdge({ edge: edge });
1288
+ });
1289
+ }
1290
+
1291
+ //----------------------------------------------------------------------------------------------------
1292
+ //endregion
1293
+
1294
+ //region 方法: 绘制「连线」节点
1295
+ //----------------------------------------------------------------------------------------------------
1296
+ /**
1297
+ * 绘制环形输送线--绘制连线.
1298
+ *
1299
+ * @param param
1300
+ * @param param.edge 连线.
1301
+ */
1302
+ function $CircularConveyor$drawEdge(param: { edge: Edge }): Q.Edge | null {
1303
+ const lineWidth = 20;
1304
+
1305
+ if (!param.edge.source) {
1306
+ ____ERROR____('KgSimulatorCanvas | 绘制连线 | 起始节点主键(source)为空', { edge: param.edge });
1307
+ return null;
1308
+ }
1309
+
1310
+ if (!param.edge.target) {
1311
+ ____ERROR____('KgSimulatorCanvas | 绘制连线 | 目标节点主键(target)为空', { edge: param.edge });
1312
+ return null;
1313
+ }
1314
+
1315
+ if (param.edge.source === param.edge.target) {
1316
+ ____ERROR____('KgSimulatorCanvas | 绘制连线 | 起始节点主键(source)和目标节点主键(target)一样了', { edge: param.edge });
1317
+ return null;
1318
+ }
1319
+
1320
+ const station01Node: Q.Node = kgSimulator.get$graph()!.graphModel.datas.find((i) => (i.properties as INodeProperty).data.id === param.edge.source);
1321
+ if (!station01Node) {
1322
+ ____ERROR____('KgSimulatorCanvas | 绘制连线 | 起始节点为空');
1323
+ return null;
1324
+ }
1325
+
1326
+ const stationNode02: Q.Node = kgSimulator.get$graph()!.graphModel.datas.find((i) => (i.properties as INodeProperty).data.id === param.edge.target);
1327
+ if (!stationNode02) {
1328
+ ____ERROR____('KgSimulatorCanvas | 绘制连线 | 目标节点为空');
1329
+ return null;
1330
+ }
1331
+
1332
+ if (station01Node.x !== stationNode02.x && station01Node.y !== stationNode02.y) {
1333
+ ____WARN_____(`KgSimulatorCanvas | 绘制连线 | 「${(station01Node.properties as INodeProperty).data.code}」到「${(stationNode02.properties as INodeProperty).data.code}」不是一条水平或者垂直路线, 请确认坐标是否有误`);
1334
+ }
1335
+
1336
+ // 连线长度,
1337
+ const length = (() => {
1338
+ if (station01Node.x === stationNode02.x) {
1339
+ return Math.abs(station01Node.y - stationNode02.y);
1340
+ } else {
1341
+ return Math.abs(station01Node.x - stationNode02.x);
1342
+ }
1343
+ })();
1344
+
1345
+ // 根据主线支线确定线宽,
1346
+ const EDGE_WIDTH = (() => {
1347
+ // 主线,
1348
+ if (param.edge.isPrimary) {
1349
+ return lineWidth * 4;
1350
+ }
1351
+ // 支线,
1352
+ else {
1353
+ return lineWidth * 2;
1354
+ }
1355
+ })();
1356
+
1357
+ // 如果节点之间已经存在连线, 则需要调整连线偏移位置, 避免连线相互遮盖,
1358
+ let EDGE_OFFSET = (() => {
1359
+ if (station01Node.hasEdgeWith(stationNode02) || stationNode02.hasEdgeWith(station01Node)) {
1360
+ if (station01Node.x === stationNode02.x) {
1361
+ return { x: EDGE_WIDTH * 6.5, y: 0 };
1362
+ } else {
1363
+ return { x: 0, y: EDGE_WIDTH * 6.5 };
1364
+ }
1365
+ }
1366
+
1367
+ return { x: 0, y: 0 };
1368
+ })();
1369
+
1370
+ const edge: Q.Edge = kgSimulator.get$graph()!.createEdge(null, station01Node, stationNode02);
1371
+ edge.zIndex = 6;
1372
+ // 如果起始节点和终止节点重合了, 则隐藏连线,
1373
+ edge.visible = !(station01Node.x === stationNode02.x && station01Node.y === stationNode02.y);
1374
+ edge.putStyles({
1375
+ [Q.Styles.ARROW_FROM]: Q.Consts.SHAPE_RECT,
1376
+ [Q.Styles.ARROW_FROM_FILL_COLOR]: '#000000',
1377
+ [Q.Styles.ARROW_FROM_LINE_CAP]: Q.Consts.LINE_CAP_TYPE_BUTT,
1378
+ [Q.Styles.ARROW_FROM_LINE_JOIN]: Q.Consts.LINE_JOIN_TYPE_MITER,
1379
+ [Q.Styles.ARROW_FROM_SIZE]: EDGE_WIDTH,
1380
+ [Q.Styles.ARROW_FROM_STROKE]: 0,
1381
+ [Q.Styles.ARROW_TO]: Q.Consts.SHAPE_TRIANGLE,
1382
+ [Q.Styles.ARROW_TO_FILL_COLOR]: '#666666',
1383
+ [Q.Styles.ARROW_TO_LINE_CAP]: Q.Consts.LINE_CAP_TYPE_BUTT,
1384
+ [Q.Styles.ARROW_TO_LINE_JOIN]: Q.Consts.LINE_JOIN_TYPE_MITER,
1385
+ [Q.Styles.ARROW_TO_SIZE]: lineWidth * 20,
1386
+ [Q.Styles.ARROW_TO_STROKE]: 0,
1387
+ [Q.Styles.EDGE_COLOR]: '#666666',
1388
+ [Q.Styles.EDGE_CORNER]: Q.Consts.EDGE_CORNER_NONE,
1389
+ [Q.Styles.EDGE_FROM_AT_EDGE]: false,
1390
+ [Q.Styles.EDGE_FROM_OFFSET]: EDGE_OFFSET,
1391
+ [Q.Styles.EDGE_LINE_DASH]: [length - 100, 100],
1392
+ [Q.Styles.EDGE_LINE_DASH_OFFSET]: 0,
1393
+ [Q.Styles.EDGE_TO_AT_EDGE]: false,
1394
+ [Q.Styles.EDGE_TO_OFFSET]: EDGE_OFFSET,
1395
+ [Q.Styles.EDGE_WIDTH]: EDGE_WIDTH,
1396
+ [Q.Styles.LINE_CAP]: Q.Consts.LINE_CAP_TYPE_BUTT,
1397
+ [Q.Styles.LINE_JOIN]: Q.Consts.LINE_JOIN_TYPE_MITER,
1398
+ });
1399
+ edge.properties = {
1400
+ $Edge$length: length,
1401
+ data: param.edge,
1402
+ type: NODE_KEY.EDGE,
1403
+ } as INodeProperty;
1404
+
1405
+ // @ts-ignore
1406
+ window.__debug__(edge);
1407
+
1408
+ return null;
1409
+ }
1410
+
1411
+ //----------------------------------------------------------------------------------------------------
1412
+ //endregion
1413
+
1414
+ //region 方法: 绘制「代理者」列表
1415
+ //----------------------------------------------------------------------------------------------------
1416
+ /**
1417
+ * 绘制环形输送线--绘制代理者列表.
1418
+ */
1419
+ function $CircularConveyor$drawDLZList() {
1420
+ kgSimulator.$Env$CircularConveyor$CurrentScene?.agents?.forEach((agent) => {
1421
+ $CircularConveyor$drawDLZ({ agent: agent });
1422
+ });
1423
+ }
1424
+
1425
+ //----------------------------------------------------------------------------------------------------
1426
+ //endregion
1427
+
1428
+ //region 方法: 绘制「代理者」节点
1429
+ //----------------------------------------------------------------------------------------------------
1430
+ /**
1431
+ * 绘制环形输送线--绘制代理者.
1432
+ *
1433
+ * @param param
1434
+ * @param param.agent 代理者.
1435
+ */
1436
+ function $CircularConveyor$drawDLZ(param: { agent: Agent }): Q.Node | null {
1437
+ const lineWidth = 20;
1438
+
1439
+ const x = param.agent.x ?? 0;
1440
+ const y = param.agent.y ?? 0;
1441
+ const width = param.agent.width ?? 200;
1442
+ const length = param.agent.length ?? 200;
1443
+
1444
+ const path = new Q.Path();
1445
+ path.moveTo(-(width / 2 - lineWidth / 2), -(length / 2 - lineWidth / 2));
1446
+ path.lineTo(width / 2 - lineWidth / 2, -(length / 2 - lineWidth / 2));
1447
+ path.lineTo(width / 2 - lineWidth / 2, length / 2 - lineWidth / 2);
1448
+ path.lineTo(-(width / 2 - lineWidth / 2), length / 2 - lineWidth / 2);
1449
+ path.closePath();
1450
+
1451
+ const node = kgSimulator.get$graph()!.createNode(null, x, y);
1452
+ node.size = new Q.Size(width, length);
1453
+ node.image = path;
1454
+ node.zIndex = 5;
1455
+ node.movable = true;
1456
+ node.selectable = true;
1457
+ node.putStyles({
1458
+ [Q.Styles.LINE_JOIN]: Q.Consts.LINE_JOIN_TYPE_MITER,
1459
+ [Q.Styles.SHAPE_FILL_COLOR]: '#1677ff',
1460
+ [Q.Styles.SHAPE_STROKE]: lineWidth,
1461
+ [Q.Styles.SHAPE_STROKE_STYLE]: '#000000',
1462
+ });
1463
+ node.properties = {
1464
+ $Agent$Move$station01Code: (() => {
1465
+ const stationNode = kgSimulator
1466
+ .get$graph()!
1467
+ .graphModel.datas.find(
1468
+ (i) =>
1469
+ i instanceof Q.Node &&
1470
+ [NODE_KEY.SSJ, NODE_KEY.YZJ, NODE_KEY.DPJ].includes((i.properties as INodeProperty).type) &&
1471
+ i.x - i.size.width / 2 <= x &&
1472
+ i.x + i.size.width / 2 >= x &&
1473
+ i.y - i.size.height / 2 <= y &&
1474
+ i.y + i.size.height / 2 >= y,
1475
+ );
1476
+ if (stationNode) {
1477
+ return ((stationNode.properties as INodeProperty).data as Station).code;
1478
+ }
1479
+
1480
+ return '';
1481
+ })(),
1482
+ $Agent$Move$CurrentVelocity: 0,
1483
+ data: param.agent,
1484
+ type: NODE_KEY.DLZ,
1485
+ } as INodeProperty;
1486
+
1487
+ $CircularConveyor$drawDLZ$DrawText({ agent: param.agent, agentNode: node });
1488
+
1489
+ return node;
1490
+ }
1491
+
1492
+ //----------------------------------------------------------------------------------------------------
1493
+ //endregion
1494
+
1495
+ //region 方法: 绘制「代理者」文本
1496
+ //----------------------------------------------------------------------------------------------------
1497
+ /**
1498
+ * 绘制环形输送线--绘制代理者--绘制文本.
1499
+ *
1500
+ * @param param.agent 代理者.
1501
+ * @param param.agentNode 代理者节点.
1502
+ */
1503
+ function $CircularConveyor$drawDLZ$DrawText(param: { agent: Agent; agentNode: Q.Node }): void {
1504
+ const labelUI = new Q.LabelUI(param.agent.code || param.agent.id || 'NULL');
1505
+
1506
+ labelUI.code = NODE_UI_KEY.DLZ_CODE;
1507
+ labelUI.fontSize = 256;
1508
+ labelUI.position = Q.Position.LEFT_TOP;
1509
+ labelUI.anchorPosition = Q.Position.LEFT_TOP;
1510
+ labelUI.alignPosition = Q.Position.LEFT_TOP;
1511
+ labelUI.borderRadius = 0;
1512
+ labelUI.showPointer = false;
1513
+ labelUI.color = '#000000';
1514
+ labelUI.syncSelection = false;
1515
+ labelUI.offsetX = 20 * 2;
1516
+ labelUI.offsetY = 20 * 2;
1517
+
1518
+ param.agentNode.addUI(labelUI);
1519
+ }
1520
+ //----------------------------------------------------------------------------------------------------
1521
+ //endregion
1522
+
1523
+ //----------------------------------------------------------------------------------------------------
1524
+ //endregion
1525
+
1526
+ //region 方法: 绘制环形穿梭车
1527
+ //----------------------------------------------------------------------------------------------------
1528
+ /**
1529
+ * 绘制环形穿梭车.
1530
+ *
1531
+ * @param param
1532
+ * @param param.isZoomToOverview 是否纵览比例, 默认为 false.
1533
+ */
1534
+ function circularShuttle$Draw(param?: { isZoomToOverview?: boolean }) {
1535
+ try {
1536
+ // 上次绘制尚未完成, 取消本次绘制,
1537
+ if (isDrawing) {
1538
+ return;
1539
+ }
1540
+
1541
+ isDrawing = true;
1542
+
1543
+ kgSimulator.get$graph()!.clear();
1544
+
1545
+ if (param?.isZoomToOverview ?? false) {
1546
+ setTimeout(() => {
1547
+ kgSimulator.get$graph()!.zoomToOverview(false);
1548
+ }, 200);
1549
+ }
1550
+
1551
+ isDrawing = false;
1552
+ } catch (e) {
1553
+ isDrawing = false;
1554
+ throw e;
1555
+ } finally {
1556
+ }
1557
+ }
1558
+ //----------------------------------------------------------------------------------------------------
1559
+ //endregion
1560
+
1561
+ //region 方法: 应用动画效果--选中
1562
+ //----------------------------------------------------------------------------------------------------
1563
+ /**
1564
+ * 应用动画效果--选中.
1565
+ */
1566
+ function doAnimation$Select() {
1567
+ if (kgSimulator.$Config$CircularConveyor$IsEnableSelectAnimation) {
1568
+ try {
1569
+ if ($Animation$Select$DashOffset <= Number.MIN_SAFE_INTEGER) {
1570
+ $Animation$Select$DashOffset = 0;
1571
+ }
1572
+ $Animation$Select$DashOffset -= 25;
1573
+
1574
+ kgSimulator.get$graph()?.forEach((element: Q.Node | Q.Edge) => {
1575
+ const elementProperties = element.properties as INodeProperty;
1576
+
1577
+ switch (elementProperties.type) {
1578
+ //region 创建者
1579
+ //----------------------------------------------------------------------------------------------------
1580
+ case NODE_KEY.CJZ: {
1581
+ // 已选中,
1582
+ if (kgSimulator.get$graph()!.isSelected(element)) {
1583
+ element.putStyles({
1584
+ [Q.Styles.SHAPE_LINE_DASH]: [100, 100],
1585
+ [Q.Styles.SHAPE_LINE_DASH_OFFSET]: $Animation$Select$DashOffset,
1586
+ [Q.Styles.SHAPE_STROKE_STYLE]: '#eb2f96',
1587
+ });
1588
+
1589
+ const labelUI = getNodeUiByCode<Q.LabelUI>({ code: NODE_UI_KEY.CJZ_CODE, node: element as Q.Node });
1590
+ if (labelUI) {
1591
+ labelUI.ui.color = labelUI.ui.color === '#000000' ? '#eb2f96' : '#000000';
1592
+ }
1593
+ }
1594
+ // 未选中,
1595
+ else {
1596
+ element.putStyles({
1597
+ [Q.Styles.SHAPE_LINE_DASH]: undefined,
1598
+ [Q.Styles.SHAPE_LINE_DASH_OFFSET]: 0,
1599
+ [Q.Styles.SHAPE_STROKE_STYLE]: '#000000',
1600
+ });
1601
+
1602
+ const labelUI = getNodeUiByCode<Q.LabelUI>({ code: NODE_UI_KEY.CJZ_CODE, node: element as Q.Node });
1603
+ if (labelUI) {
1604
+ labelUI.ui.color = '#000000';
1605
+ }
1606
+ }
1607
+
1608
+ break;
1609
+ }
1610
+ //----------------------------------------------------------------------------------------------------
1611
+ //endregion
1612
+
1613
+ //region 销毁者
1614
+ //----------------------------------------------------------------------------------------------------
1615
+ case NODE_KEY.XHZ: {
1616
+ // 已选中,
1617
+ if (kgSimulator.get$graph()!.isSelected(element)) {
1618
+ element.putStyles({
1619
+ [Q.Styles.SHAPE_LINE_DASH]: [100, 100],
1620
+ [Q.Styles.SHAPE_LINE_DASH_OFFSET]: $Animation$Select$DashOffset,
1621
+ [Q.Styles.SHAPE_STROKE_STYLE]: '#eb2f96',
1622
+ });
1623
+
1624
+ const labelUI = getNodeUiByCode<Q.LabelUI>({ code: NODE_UI_KEY.XHZ_CODE, node: element as Q.Node });
1625
+ if (labelUI) {
1626
+ labelUI.ui.color = labelUI.ui.color === '#000000' ? '#eb2f96' : '#000000';
1627
+ }
1628
+ }
1629
+ // 未选中,
1630
+ else {
1631
+ element.putStyles({
1632
+ [Q.Styles.SHAPE_LINE_DASH]: undefined,
1633
+ [Q.Styles.SHAPE_LINE_DASH_OFFSET]: 0,
1634
+ [Q.Styles.SHAPE_STROKE_STYLE]: '#000000',
1635
+ });
1636
+
1637
+ const labelUI = getNodeUiByCode<Q.LabelUI>({ code: NODE_UI_KEY.XHZ_CODE, node: element as Q.Node });
1638
+ if (labelUI) {
1639
+ labelUI.ui.color = '#000000';
1640
+ }
1641
+ }
1642
+
1643
+ break;
1644
+ }
1645
+ //----------------------------------------------------------------------------------------------------
1646
+ //endregion
1647
+
1648
+ //region 输送机
1649
+ //----------------------------------------------------------------------------------------------------
1650
+ case NODE_KEY.SSJ: {
1651
+ // 已选中,
1652
+ if (kgSimulator.get$graph()!.isSelected(element)) {
1653
+ element.putStyles({
1654
+ [Q.Styles.SHAPE_LINE_DASH]: [100, 100],
1655
+ [Q.Styles.SHAPE_LINE_DASH_OFFSET]: $Animation$Select$DashOffset,
1656
+ [Q.Styles.SHAPE_STROKE_STYLE]: '#eb2f96',
1657
+ });
1658
+
1659
+ const labelUI = getNodeUiByCode<Q.LabelUI>({ code: NODE_UI_KEY.SSJ_CODE, node: element as Q.Node });
1660
+ if (labelUI) {
1661
+ labelUI.ui.color = labelUI.ui.color === '#000000' ? '#eb2f96' : '#000000';
1662
+ }
1663
+ }
1664
+ // 未选中,
1665
+ else {
1666
+ element.putStyles({
1667
+ [Q.Styles.SHAPE_LINE_DASH]: undefined,
1668
+ [Q.Styles.SHAPE_LINE_DASH_OFFSET]: 0,
1669
+ [Q.Styles.SHAPE_STROKE_STYLE]: '#000000',
1670
+ });
1671
+
1672
+ const labelUI = getNodeUiByCode<Q.LabelUI>({ code: NODE_UI_KEY.SSJ_CODE, node: element as Q.Node });
1673
+ if (labelUI) {
1674
+ labelUI.ui.color = '#000000';
1675
+ }
1676
+ }
1677
+
1678
+ break;
1679
+ }
1680
+ //----------------------------------------------------------------------------------------------------
1681
+ //endregion
1682
+
1683
+ //region 移栽机
1684
+ //----------------------------------------------------------------------------------------------------
1685
+ case NODE_KEY.YZJ: {
1686
+ // 已选中,
1687
+ if (kgSimulator.get$graph()!.isSelected(element)) {
1688
+ element.putStyles({
1689
+ [Q.Styles.SHAPE_LINE_DASH]: [100, 100],
1690
+ [Q.Styles.SHAPE_LINE_DASH_OFFSET]: $Animation$Select$DashOffset,
1691
+ [Q.Styles.SHAPE_STROKE_STYLE]: '#eb2f96',
1692
+ });
1693
+
1694
+ const labelUI = getNodeUiByCode<Q.LabelUI>({ code: NODE_UI_KEY.YZJ_CODE, node: element as Q.Node });
1695
+ if (labelUI) {
1696
+ labelUI.ui.color = labelUI.ui.color === '#000000' ? '#eb2f96' : '#000000';
1697
+ }
1698
+ }
1699
+ // 未选中,
1700
+ else {
1701
+ element.putStyles({
1702
+ [Q.Styles.SHAPE_LINE_DASH]: undefined,
1703
+ [Q.Styles.SHAPE_LINE_DASH_OFFSET]: 0,
1704
+ [Q.Styles.SHAPE_STROKE_STYLE]: '#000000',
1705
+ });
1706
+
1707
+ const labelUI = getNodeUiByCode<Q.LabelUI>({ code: NODE_UI_KEY.YZJ_CODE, node: element as Q.Node });
1708
+ if (labelUI) {
1709
+ labelUI.ui.color = '#000000';
1710
+ }
1711
+ }
1712
+
1713
+ break;
1714
+ }
1715
+ //----------------------------------------------------------------------------------------------------
1716
+ //endregion
1717
+
1718
+ //region 叠盘机
1719
+ //----------------------------------------------------------------------------------------------------
1720
+ case NODE_KEY.DPJ: {
1721
+ // 已选中,
1722
+ if (kgSimulator.get$graph()!.isSelected(element)) {
1723
+ element.putStyles({
1724
+ [Q.Styles.SHAPE_LINE_DASH]: [100, 100],
1725
+ [Q.Styles.SHAPE_LINE_DASH_OFFSET]: $Animation$Select$DashOffset,
1726
+ [Q.Styles.SHAPE_STROKE_STYLE]: '#eb2f96',
1727
+ });
1728
+
1729
+ const labelUI = getNodeUiByCode<Q.LabelUI>({ code: NODE_UI_KEY.DPJ_CODE, node: element as Q.Node });
1730
+ if (labelUI) {
1731
+ labelUI.ui.color = labelUI.ui.color === '#000000' ? '#eb2f96' : '#000000';
1732
+ }
1733
+ }
1734
+ // 未选中,
1735
+ else {
1736
+ element.putStyles({
1737
+ [Q.Styles.SHAPE_LINE_DASH]: undefined,
1738
+ [Q.Styles.SHAPE_LINE_DASH_OFFSET]: 0,
1739
+ [Q.Styles.SHAPE_STROKE_STYLE]: '#000000',
1740
+ });
1741
+
1742
+ const labelUI = getNodeUiByCode<Q.LabelUI>({ code: NODE_UI_KEY.DPJ_CODE, node: element as Q.Node });
1743
+ if (labelUI) {
1744
+ labelUI.ui.color = '#000000';
1745
+ }
1746
+ }
1747
+
1748
+ break;
1749
+ }
1750
+ //----------------------------------------------------------------------------------------------------
1751
+ //endregion
1752
+
1753
+ //region 传感器
1754
+ //----------------------------------------------------------------------------------------------------
1755
+ case NODE_KEY.CGQ: {
1756
+ // 已选中,
1757
+ if (kgSimulator.get$graph()!.isSelected(element)) {
1758
+ element.putStyles({
1759
+ [Q.Styles.SHAPE_LINE_DASH]: [100, 100],
1760
+ [Q.Styles.SHAPE_LINE_DASH_OFFSET]: $Animation$Select$DashOffset,
1761
+ [Q.Styles.SHAPE_STROKE_STYLE]: '#eb2f96',
1762
+ });
1763
+ }
1764
+ // 未选中,
1765
+ else {
1766
+ element.putStyles({
1767
+ [Q.Styles.SHAPE_LINE_DASH]: undefined,
1768
+ [Q.Styles.SHAPE_LINE_DASH_OFFSET]: 0,
1769
+ [Q.Styles.SHAPE_STROKE_STYLE]: '#ff0000',
1770
+ });
1771
+ }
1772
+
1773
+ break;
1774
+ }
1775
+ //----------------------------------------------------------------------------------------------------
1776
+ //endregion
1777
+
1778
+ //region 连线
1779
+ //----------------------------------------------------------------------------------------------------
1780
+ case NODE_KEY.EDGE: {
1781
+ // 已选中,
1782
+ if (kgSimulator.get$graph()!.isSelected(element)) {
1783
+ element.putStyles({
1784
+ [Q.Styles.ARROW_TO_FILL_COLOR]: '#eb2f96',
1785
+ [Q.Styles.EDGE_COLOR]: '#eb2f96',
1786
+ [Q.Styles.EDGE_LINE_DASH]: [100, 100],
1787
+ [Q.Styles.EDGE_LINE_DASH_OFFSET]: $Animation$Select$DashOffset,
1788
+ });
1789
+ }
1790
+ // 未选中,
1791
+ else {
1792
+ element.putStyles({
1793
+ [Q.Styles.ARROW_TO_FILL_COLOR]: '#666666',
1794
+ [Q.Styles.EDGE_COLOR]: '#666666',
1795
+ [Q.Styles.EDGE_LINE_DASH]: elementProperties.$Edge$length ? [elementProperties.$Edge$length! - 100, 100] : undefined,
1796
+ [Q.Styles.EDGE_LINE_DASH_OFFSET]: 0,
1797
+ });
1798
+ }
1799
+
1800
+ kgSimulator.get$graph()!.invalidateElement(element);
1801
+
1802
+ break;
1803
+ }
1804
+ //----------------------------------------------------------------------------------------------------
1805
+ //endregion
1806
+
1807
+ //region 代理者
1808
+ //----------------------------------------------------------------------------------------------------
1809
+ case NODE_KEY.DLZ: {
1810
+ // 已选中,
1811
+ if (kgSimulator.get$graph()!.isSelected(element)) {
1812
+ element.putStyles({
1813
+ [Q.Styles.SHAPE_LINE_DASH]: [100, 100],
1814
+ [Q.Styles.SHAPE_LINE_DASH_OFFSET]: $Animation$Select$DashOffset,
1815
+ [Q.Styles.SHAPE_STROKE_STYLE]: '#eb2f96',
1816
+ });
1817
+
1818
+ const labelUI = getNodeUiByCode<Q.LabelUI>({ code: NODE_UI_KEY.DLZ_CODE, node: element as Q.Node });
1819
+ if (labelUI) {
1820
+ labelUI.ui.color = labelUI.ui.color === '#000000' ? '#eb2f96' : '#000000';
1821
+ }
1822
+ }
1823
+ // 未选中,
1824
+ else {
1825
+ element.putStyles({
1826
+ [Q.Styles.SHAPE_LINE_DASH]: undefined,
1827
+ [Q.Styles.SHAPE_LINE_DASH_OFFSET]: 0,
1828
+ [Q.Styles.SHAPE_STROKE_STYLE]: '#000000',
1829
+ });
1830
+
1831
+ const labelUI = getNodeUiByCode<Q.LabelUI>({ code: NODE_UI_KEY.DLZ_CODE, node: element as Q.Node });
1832
+ if (labelUI) {
1833
+ labelUI.ui.color = '#000000';
1834
+ }
1835
+ }
1836
+
1837
+ break;
1838
+ }
1839
+ //----------------------------------------------------------------------------------------------------
1840
+ //endregion
1841
+
1842
+ //region 其他
1843
+ //----------------------------------------------------------------------------------------------------
1844
+ default: {
1845
+ // 已选中,
1846
+ if (kgSimulator.get$graph()!.isSelected(element)) {
1847
+ element.putStyles({
1848
+ [Q.Styles.SHAPE_LINE_DASH]: [100, 100],
1849
+ [Q.Styles.SHAPE_LINE_DASH_OFFSET]: $Animation$Select$DashOffset,
1850
+ [Q.Styles.SHAPE_STROKE_STYLE]: '#eb2f96',
1851
+ });
1852
+ }
1853
+ // 未选中,
1854
+ else {
1855
+ element.putStyles({
1856
+ [Q.Styles.SHAPE_LINE_DASH]: undefined,
1857
+ [Q.Styles.SHAPE_LINE_DASH_OFFSET]: 0,
1858
+ [Q.Styles.SHAPE_STROKE_STYLE]: '#000000',
1859
+ });
1860
+ }
1861
+
1862
+ break;
1863
+ }
1864
+ //----------------------------------------------------------------------------------------------------
1865
+ //endregion
1866
+ }
1867
+ });
1868
+ } catch (e: any) {
1869
+ ____ERROR____(`KgSimulatorCanvas | 动画效果--选中 | ${e.message}`);
1870
+ }
1871
+ } else {
1872
+ // N/A
1873
+ }
1874
+
1875
+ $Animation$Select$Timer = window.setTimeout(() => {
1876
+ doAnimation$Select();
1877
+ }, $Animation$Select$Interval);
1878
+ }
1879
+
1880
+ if ($Animation$Select$Timer && $Animation$Select$Timer !== -1) {
1881
+ clearTimeout($Animation$Select$Timer);
1882
+ }
1883
+
1884
+ $Animation$Select$Timer = window.setTimeout(() => {
1885
+ doAnimation$Select();
1886
+ }, $Animation$Select$Interval);
1887
+ //----------------------------------------------------------------------------------------------------
1888
+ //endregion
1889
+
1890
+ //region 方法: 应用动画效果--移栽机--上升下降箭头
1891
+ //----------------------------------------------------------------------------------------------------
1892
+ /**
1893
+ * 应用动画效果--移栽机--上升下降箭头.
1894
+ */
1895
+ function doAnimation$YZJ$Arrow() {
1896
+ try {
1897
+ if (kgSimulator.$Mode$IsSimulate && kgSimulator.$Mode$Simulate$IsRunning) {
1898
+ kgSimulator.get$graph()?.forEach((yzjNode: Q.Node) => {
1899
+ const dsyzjNodeProperties = yzjNode.properties as INodeProperty;
1900
+
1901
+ switch (dsyzjNodeProperties.type) {
1902
+ case NODE_KEY.YZJ: {
1903
+ const yzj = dsyzjNodeProperties.data as JackUpTransferStation;
1904
+ const upArrowUI = getNodeUiByCode<Q.ImageUI>({ code: NODE_UI_KEY.YZJ_UP_ARROW, node: yzjNode });
1905
+ const downArrowUI = getNodeUiByCode<Q.ImageUI>({ code: NODE_UI_KEY.YZJ_DOWN_ARROW, node: yzjNode });
1906
+
1907
+ //region 正在上升
1908
+ //----------------------------------------------------------------------------------------------------
1909
+ if (dsyzjNodeProperties.$YZJ$IsUpDoing) {
1910
+ upArrowUI.ui.visible = !upArrowUI.ui.visible;
1911
+ downArrowUI.ui.visible = false;
1912
+ kgSimulator.get$graph()?.invalidateElement(yzjNode);
1913
+ }
1914
+ //----------------------------------------------------------------------------------------------------
1915
+ //endregion
1916
+
1917
+ //region 正在下降
1918
+ //----------------------------------------------------------------------------------------------------
1919
+ else if (dsyzjNodeProperties.$YZJ$IsDownDoing) {
1920
+ upArrowUI.ui.visible = false;
1921
+ downArrowUI.ui.visible = !downArrowUI.ui.visible;
1922
+ kgSimulator.get$graph()?.invalidateElement(yzjNode);
1923
+ }
1924
+
1925
+ //----------------------------------------------------------------------------------------------------
1926
+ //endregion
1927
+
1928
+ //region 停止不动
1929
+ //----------------------------------------------------------------------------------------------------
1930
+ else {
1931
+ //region 停在上面
1932
+ //----------------------------------------------------------------------------------------------------
1933
+ if (dsyzjNodeProperties.$YZJ$CurrentPosition === 'UP') {
1934
+ upArrowUI.ui.visible = true;
1935
+ downArrowUI.ui.visible = false;
1936
+ kgSimulator.get$graph()?.invalidateElement(yzjNode);
1937
+ }
1938
+ //----------------------------------------------------------------------------------------------------
1939
+ //endregion
1940
+
1941
+ //region 停在下面
1942
+ //----------------------------------------------------------------------------------------------------
1943
+ else {
1944
+ upArrowUI.ui.visible = false;
1945
+ downArrowUI.ui.visible = true;
1946
+ kgSimulator.get$graph()?.invalidateElement(yzjNode);
1947
+ }
1948
+ //----------------------------------------------------------------------------------------------------
1949
+ //endregion
1950
+ }
1951
+ //----------------------------------------------------------------------------------------------------
1952
+ //endregion
1953
+
1954
+ break;
1955
+ }
1956
+ }
1957
+ });
1958
+ }
1959
+ } catch (e: any) {
1960
+ ____ERROR____(`KgSimulatorCanvas | 动画效果--顶升移栽机--上升下降箭头 | ${e.message}`);
1961
+ }
1962
+
1963
+ $Animation$YZJ$Arrow$Timer = window.setTimeout(() => {
1964
+ doAnimation$YZJ$Arrow();
1965
+ }, $Animation$YZJ$Arrow$Interval);
1966
+ }
1967
+
1968
+ if ($Animation$YZJ$Arrow$Timer && $Animation$YZJ$Arrow$Timer !== -1) {
1969
+ clearTimeout($Animation$YZJ$Arrow$Timer);
1970
+ }
1971
+
1972
+ $Animation$YZJ$Arrow$Timer = window.setTimeout(() => {
1973
+ doAnimation$YZJ$Arrow();
1974
+ }, $Animation$YZJ$Arrow$Interval);
1975
+ //----------------------------------------------------------------------------------------------------
1976
+ //endregion
1977
+
1978
+ //region 方法: 应用动画效果--叠盘机--叠盘拆盘箭头
1979
+ //----------------------------------------------------------------------------------------------------
1980
+ /**
1981
+ * 应用动画效果--叠盘机--叠盘拆盘箭头.
1982
+ */
1983
+ function doAnimation$DPJ$Arrow() {
1984
+ try {
1985
+ if (kgSimulator.$Mode$IsSimulate && kgSimulator.$Mode$Simulate$IsRunning) {
1986
+ kgSimulator.get$graph()?.forEach((dpjNode: Q.Node) => {
1987
+ const dpjNodeProperties = dpjNode.properties as INodeProperty;
1988
+
1989
+ switch (dpjNodeProperties.type) {
1990
+ case NODE_KEY.DPJ: {
1991
+ const dpj = dpjNodeProperties.data as PalletStackerStation;
1992
+ const inArrowUI = getNodeUiByCode<Q.ImageUI>({ code: NODE_UI_KEY.DPJ_IN_ARROW, node: dpjNode });
1993
+ const outArrowUI = getNodeUiByCode<Q.ImageUI>({ code: NODE_UI_KEY.DPJ_OUT_ARROW, node: dpjNode });
1994
+
1995
+ //region 正在叠盘
1996
+ //----------------------------------------------------------------------------------------------------
1997
+ if (dpjNodeProperties.$DPJ$IsInDoing) {
1998
+ inArrowUI.ui.visible = !inArrowUI.ui.visible;
1999
+ outArrowUI.ui.visible = false;
2000
+ kgSimulator.get$graph()?.invalidateElement(dpjNode);
2001
+ }
2002
+ //----------------------------------------------------------------------------------------------------
2003
+ //endregion
2004
+
2005
+ //region 正在拆盘
2006
+ //----------------------------------------------------------------------------------------------------
2007
+ else if (dpjNodeProperties.$DPJ$IsOutDoing) {
2008
+ inArrowUI.ui.visible = false;
2009
+ outArrowUI.ui.visible = !outArrowUI.ui.visible;
2010
+ kgSimulator.get$graph()?.invalidateElement(dpjNode);
2011
+ }
2012
+
2013
+ //----------------------------------------------------------------------------------------------------
2014
+ //endregion
2015
+
2016
+ //region 停止不动
2017
+ //----------------------------------------------------------------------------------------------------
2018
+ else {
2019
+ inArrowUI.ui.visible = false;
2020
+ outArrowUI.ui.visible = false;
2021
+ kgSimulator.get$graph()?.invalidateElement(dpjNode);
2022
+ }
2023
+ //----------------------------------------------------------------------------------------------------
2024
+ //endregion
2025
+
2026
+ break;
2027
+ }
2028
+ }
2029
+ });
2030
+ }
2031
+ } catch (e: any) {
2032
+ ____ERROR____(`KgSimulatorCanvas | 动画效果--叠盘机--叠盘拆盘箭头 | ${e.message}`);
2033
+ }
2034
+
2035
+ $Animation$DPJ$Arrow$Timer = window.setTimeout(() => {
2036
+ doAnimation$DPJ$Arrow();
2037
+ }, $Animation$DPJ$Arrow$Interval);
2038
+ }
2039
+
2040
+ if ($Animation$DPJ$Arrow$Timer && $Animation$DPJ$Arrow$Timer !== -1) {
2041
+ clearTimeout($Animation$DPJ$Arrow$Timer);
2042
+ }
2043
+
2044
+ $Animation$DPJ$Arrow$Timer = window.setTimeout(() => {
2045
+ doAnimation$DPJ$Arrow();
2046
+ }, $Animation$DPJ$Arrow$Interval);
2047
+ //----------------------------------------------------------------------------------------------------
2048
+ //endregion
2049
+
2050
+ //region 方法: 应用动画效果--代理者--移动
2051
+ //----------------------------------------------------------------------------------------------------
2052
+ /**
2053
+ * 应用动画效果--代理者--移动--向上--执行移动. 代理者移动的通用逻辑.
2054
+ *
2055
+ * @param param.agentNode 代理者节点.
2056
+ * @param param.direction 移动方向.
2057
+ */
2058
+ function doAnimation$Agent$Move$Up$doMove(param: { agentNode: Q.Node; direction: 'UP' | 'DOWN' | 'LEFT' | 'RIGHT'; stationNode03: Q.Node | null }) {
2059
+ const edgeProperties = (param.agentNode.properties as INodeProperty).$Agent$Move$CurrentEdge!.properties as INodeProperty;
2060
+ const agentNodeProperties = param.agentNode.properties as INodeProperty;
2061
+ const station01NodeProperties = agentNodeProperties.$Agent$Move$CurrentEdge!.from.properties as INodeProperty;
2062
+
2063
+ const stationNode02 = agentNodeProperties.$Agent$Move$CurrentEdge!.to;
2064
+ const stationNode02Properties = agentNodeProperties.$Agent$Move$CurrentEdge!.to.properties as INodeProperty;
2065
+
2066
+ const stationNode03 = param.stationNode03;
2067
+ const stationNode03Properties = stationNode03?.properties as INodeProperty | null;
2068
+
2069
+ const station02 = stationNode02Properties.data as Station;
2070
+ const edge = edgeProperties.data as Edge;
2071
+
2072
+ // 高速速度,
2073
+ const fastVelocity = kgSimulator.$Config$CircularConveyor$Agent$GlobalMaxVelocity;
2074
+ // 低速速度,
2075
+ const slowVelocity = kgSimulator.$Config$CircularConveyor$Agent$GlobalMaxVelocity / 5;
2076
+ // 当前速度,
2077
+ const currentVelocity = agentNodeProperties.$Agent$Move$CurrentVelocity ?? 0;
2078
+
2079
+ const longDistanceSensorKey = doAnimation$Agent$Move$getLongDistanceSensorKey(param);
2080
+ const xyKey = doAnimation$Agent$Move$getXyKey(param);
2081
+ const whKey = doAnimation$Agent$Move$getWhKey(param);
2082
+
2083
+ // 远传感器,
2084
+ if (station02[longDistanceSensorKey]) {
2085
+ // 「代理者」边缘离「传感器」的距离,
2086
+ const distanceToCGQ = param.agentNode[xyKey] - param.agentNode.size[whKey] / 2 - (stationNode02[xyKey] - stationNode02.size[whKey] / 2) - kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$LongDistance;
2087
+ // 「代理者」边缘离「输送机」边缘的距离,
2088
+ const distanceToSSJ = param.agentNode[xyKey] - param.agentNode.size[whKey] / 2 - (stationNode02[xyKey] - stationNode02.size[whKey] / 2);
2089
+
2090
+ switch (true) {
2091
+ // 停止阶段,
2092
+ case distanceToSSJ <= 0: {
2093
+ agentNodeProperties.$Agent$Move$IsArrive = true;
2094
+
2095
+ // 非直穿,
2096
+ if (!agentNodeProperties.$Agent$Move$IsThrough) {
2097
+ param.agentNode[xyKey] = stationNode02[xyKey] - stationNode02.size[whKey] / 2 + param.agentNode.size[whKey] / 2;
2098
+ agentNodeProperties.$Agent$Move$CurrentVelocity = 0;
2099
+ }
2100
+ // 是直穿,
2101
+ else {
2102
+ param.agentNode[xyKey] = stationNode02[xyKey] - stationNode02.size[whKey] / 2 + param.agentNode.size[whKey] / 2;
2103
+ }
2104
+ break;
2105
+ }
2106
+
2107
+ // 减速阶段,
2108
+ case distanceToCGQ <= 0 && currentVelocity > slowVelocity: {
2109
+ // 非直穿,
2110
+ if (!agentNodeProperties.$Agent$Move$IsThrough) {
2111
+ // 本次移动距离,
2112
+ const distance = (() => {
2113
+ const elapse = Date.now() - agentNodeProperties.$Agent$Move$PreviousMoveTime!;
2114
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2115
+
2116
+ // 新的当前速度,
2117
+ const newCurrentVelocity = Math.max(slowVelocity, currentVelocity - kgSimulator.$Config$CircularConveyor$Agent$GlobalAcceleration * elapse);
2118
+ // 本次移动距离,
2119
+ const _distance = ((newCurrentVelocity + (currentVelocity - newCurrentVelocity)) / 2) * elapse;
2120
+
2121
+ agentNodeProperties.$Agent$Move$CurrentVelocity = newCurrentVelocity;
2122
+
2123
+ return _distance;
2124
+ })();
2125
+
2126
+ param.agentNode[xyKey] = param.agentNode[xyKey] - distance;
2127
+ }
2128
+ // 是直穿,
2129
+ else {
2130
+ // 本次移动距离,
2131
+ const distance = (() => {
2132
+ const elapse = Date.now() - agentNodeProperties.$Agent$Move$PreviousMoveTime!;
2133
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2134
+
2135
+ return fastVelocity * elapse;
2136
+ })();
2137
+
2138
+ param.agentNode[xyKey] = param.agentNode[xyKey] - distance;
2139
+ }
2140
+ break;
2141
+ }
2142
+
2143
+ // 低速阶段,
2144
+ case distanceToCGQ < 0 && currentVelocity === slowVelocity: {
2145
+ // 非直穿,
2146
+ if (!agentNodeProperties.$Agent$Move$IsThrough) {
2147
+ // 本次移动距离,
2148
+ const distance = (() => {
2149
+ const elapse = Date.now() - agentNodeProperties.$Agent$Move$PreviousMoveTime!;
2150
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2151
+
2152
+ return slowVelocity * elapse;
2153
+ })();
2154
+
2155
+ param.agentNode[xyKey] = param.agentNode[xyKey] - distance;
2156
+ }
2157
+ // 是直穿,
2158
+ else {
2159
+ // 本次移动距离,
2160
+ const distance = (() => {
2161
+ const elapse = Date.now() - agentNodeProperties.$Agent$Move$PreviousMoveTime!;
2162
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2163
+
2164
+ return fastVelocity * elapse;
2165
+ })();
2166
+
2167
+ param.agentNode[xyKey] = param.agentNode[xyKey] - distance;
2168
+ }
2169
+ break;
2170
+ }
2171
+
2172
+ // 高速阶段,
2173
+ case distanceToCGQ > 0 && currentVelocity === fastVelocity: {
2174
+ // 本次移动距离,
2175
+ const distance = (() => {
2176
+ const elapse = Date.now() - agentNodeProperties.$Agent$Move$PreviousMoveTime!;
2177
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2178
+
2179
+ return fastVelocity * elapse;
2180
+ })();
2181
+
2182
+ param.agentNode[xyKey] = param.agentNode[xyKey] - distance;
2183
+ break;
2184
+ }
2185
+
2186
+ // 加速阶段,
2187
+ case distanceToCGQ > 0 && currentVelocity < fastVelocity: {
2188
+ // 本次移动距离,
2189
+ const distance = (() => {
2190
+ const elapse = Date.now() - agentNodeProperties.$Agent$Move$PreviousMoveTime!;
2191
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2192
+
2193
+ // 新的当前速度,
2194
+ const newCurrentVelocity = Math.min(fastVelocity, currentVelocity + kgSimulator.$Config$CircularConveyor$Agent$GlobalAcceleration * elapse);
2195
+ // 本次移动距离,
2196
+ const _distance = ((currentVelocity + (newCurrentVelocity - currentVelocity)) / 2) * elapse;
2197
+
2198
+ agentNodeProperties.$Agent$Move$CurrentVelocity = newCurrentVelocity;
2199
+
2200
+ return _distance;
2201
+ })();
2202
+
2203
+ param.agentNode[xyKey] = param.agentNode[xyKey] - distance;
2204
+ break;
2205
+ }
2206
+ }
2207
+ }
2208
+ // 近传感器
2209
+ else {
2210
+ // 「代理者」边缘离「传感器」的距离,
2211
+ const distanceToCGQ = param.agentNode[xyKey] - param.agentNode.size[whKey] / 2 - (stationNode02[xyKey] - stationNode02.size[whKey] / 2) - kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance;
2212
+
2213
+ switch (true) {
2214
+ // 停止阶段,
2215
+ case distanceToCGQ <= 0: {
2216
+ agentNodeProperties.$Agent$Move$IsArrive = true;
2217
+
2218
+ // 非直穿,
2219
+ if (!agentNodeProperties.$Agent$Move$IsThrough) {
2220
+ param.agentNode[xyKey] = stationNode02[xyKey] - stationNode02.size[whKey] / 2 + param.agentNode.size[whKey] / 2 + kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance;
2221
+ agentNodeProperties.$Agent$Move$CurrentVelocity = 0;
2222
+ }
2223
+ // 是直穿,
2224
+ else {
2225
+ param.agentNode[xyKey] = stationNode02[xyKey] - stationNode02.size[whKey] / 2 + param.agentNode.size[whKey] / 2;
2226
+ }
2227
+ break;
2228
+ }
2229
+
2230
+ // 减速阶段,
2231
+ case distanceToCGQ <= kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance$StartDecelerateDistance && currentVelocity > slowVelocity: {
2232
+ // 非直穿,
2233
+ if (!agentNodeProperties.$Agent$Move$IsThrough) {
2234
+ // 本次移动距离,
2235
+ const distance = (() => {
2236
+ const elapse = Date.now() - agentNodeProperties.$Agent$Move$PreviousMoveTime!;
2237
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2238
+
2239
+ // 新的当前速度,
2240
+ const newCurrentVelocity = Math.max(slowVelocity, currentVelocity - kgSimulator.$Config$CircularConveyor$Agent$GlobalAcceleration * elapse);
2241
+ // 本次移动距离,
2242
+ const _distance = ((newCurrentVelocity + (currentVelocity - newCurrentVelocity)) / 2) * elapse;
2243
+
2244
+ agentNodeProperties.$Agent$Move$CurrentVelocity = newCurrentVelocity;
2245
+
2246
+ return _distance;
2247
+ })();
2248
+
2249
+ param.agentNode[xyKey] = param.agentNode[xyKey] - distance;
2250
+ }
2251
+ // 是直穿,
2252
+ else {
2253
+ // 本次移动距离,
2254
+ const distance = (() => {
2255
+ const elapse = Date.now() - agentNodeProperties.$Agent$Move$PreviousMoveTime!;
2256
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2257
+
2258
+ return fastVelocity * elapse;
2259
+ })();
2260
+
2261
+ param.agentNode[xyKey] = param.agentNode[xyKey] - distance;
2262
+ }
2263
+
2264
+ break;
2265
+ }
2266
+
2267
+ // 低速阶段,
2268
+ case distanceToCGQ < kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance$StartDecelerateDistance && currentVelocity === slowVelocity: {
2269
+ // 非直穿,
2270
+ if (!agentNodeProperties.$Agent$Move$IsThrough) {
2271
+ // 本次移动距离,
2272
+ const distance = (() => {
2273
+ const elapse = Date.now() - agentNodeProperties.$Agent$Move$PreviousMoveTime!;
2274
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2275
+
2276
+ return slowVelocity * elapse;
2277
+ })();
2278
+
2279
+ param.agentNode[xyKey] = param.agentNode[xyKey] - distance;
2280
+ }
2281
+ // 是直穿,
2282
+ else {
2283
+ // 本次移动距离,
2284
+ const distance = (() => {
2285
+ const elapse = Date.now() - agentNodeProperties.$Agent$Move$PreviousMoveTime!;
2286
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2287
+
2288
+ return fastVelocity * elapse;
2289
+ })();
2290
+
2291
+ param.agentNode[xyKey] = param.agentNode[xyKey] - distance;
2292
+ }
2293
+ break;
2294
+ }
2295
+
2296
+ // 高速阶段,
2297
+ case distanceToCGQ > kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance$StartDecelerateDistance && currentVelocity === fastVelocity: {
2298
+ // 本次移动距离,
2299
+ const distance = (() => {
2300
+ const elapse = Date.now() - agentNodeProperties.$Agent$Move$PreviousMoveTime!;
2301
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2302
+
2303
+ return fastVelocity * elapse;
2304
+ })();
2305
+
2306
+ param.agentNode[xyKey] = param.agentNode[xyKey] - distance;
2307
+ break;
2308
+ }
2309
+
2310
+ // 加速阶段,
2311
+ case distanceToCGQ > kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance$StartDecelerateDistance && currentVelocity < fastVelocity: {
2312
+ // 本次移动距离,
2313
+ const distance = (() => {
2314
+ const elapse = Date.now() - agentNodeProperties.$Agent$Move$PreviousMoveTime!;
2315
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2316
+
2317
+ // 新的当前速度,
2318
+ const newCurrentVelocity = Math.min(fastVelocity, currentVelocity + kgSimulator.$Config$CircularConveyor$Agent$GlobalAcceleration * elapse);
2319
+ // 本次移动距离,
2320
+ const _distance = ((currentVelocity + (newCurrentVelocity - currentVelocity)) / 2) * elapse;
2321
+
2322
+ agentNodeProperties.$Agent$Move$CurrentVelocity = newCurrentVelocity;
2323
+
2324
+ return _distance;
2325
+ })();
2326
+
2327
+ param.agentNode[xyKey] = param.agentNode[xyKey] - distance;
2328
+ break;
2329
+ }
2330
+ }
2331
+ }
2332
+ }
2333
+
2334
+ /**
2335
+ * 应用动画效果--代理者--移动--向上--从「任意站点」到「任意站点」.
2336
+ *
2337
+ * @param param.agentNode 代理者节点.
2338
+ * @param param.direction 移动方向.
2339
+ */
2340
+ function doAnimation$Agent$Move$Up$fromANYtoANY(param: { agentNode: Q.Node; direction: 'UP' | 'DOWN' | 'LEFT' | 'RIGHT'; stationNode03: Q.Node | null }) {
2341
+ const edgeProperties = (param.agentNode.properties as INodeProperty).$Agent$Move$CurrentEdge!.properties as INodeProperty;
2342
+ const agentNodeProperties = param.agentNode.properties as INodeProperty;
2343
+
2344
+ const station01NodeProperties = agentNodeProperties.$Agent$Move$CurrentEdge!.from.properties as INodeProperty;
2345
+
2346
+ const stationNode02 = agentNodeProperties.$Agent$Move$CurrentEdge!.to;
2347
+ const stationNode02Properties = agentNodeProperties.$Agent$Move$CurrentEdge!.to.properties as INodeProperty;
2348
+
2349
+ const stationNode03 = param.stationNode03;
2350
+ const stationNode03Properties = stationNode03?.properties as INodeProperty | null;
2351
+
2352
+ const edge = edgeProperties.data as Edge;
2353
+ const station02 = stationNode02Properties.data as Station;
2354
+
2355
+ const longDistanceSensorKey = doAnimation$Agent$Move$getLongDistanceSensorKey(param);
2356
+ const xyKey = doAnimation$Agent$Move$getXyKey(param);
2357
+ const whKey = doAnimation$Agent$Move$getWhKey(param);
2358
+
2359
+ // 已经到达站点二, 远传感器,
2360
+ if (station02[longDistanceSensorKey] && param.agentNode[xyKey] - param.agentNode.size[whKey] / 2 - (stationNode02[xyKey] - stationNode02.size[whKey] / 2) <= 0) {
2361
+ agentNodeProperties.$Agent$Move$IsArrive = true;
2362
+
2363
+ // 非直穿,
2364
+ if (!agentNodeProperties.$Agent$Move$IsThrough) {
2365
+ param.agentNode[xyKey] = stationNode02[xyKey] - stationNode02.size[whKey] / 2 + param.agentNode.size[whKey] / 2;
2366
+ agentNodeProperties.$Agent$Move$CurrentVelocity = 0;
2367
+ }
2368
+ // 是直穿,
2369
+ else {
2370
+ param.agentNode[xyKey] = stationNode02[xyKey] - stationNode02.size[whKey] / 2 + param.agentNode.size[whKey] / 2;
2371
+ }
2372
+ }
2373
+ // 已经到达站点二, 近传感器,
2374
+ else if (
2375
+ !station02[longDistanceSensorKey] &&
2376
+ param.agentNode[xyKey] - param.agentNode.size[whKey] / 2 - (stationNode02[xyKey] - stationNode02.size[whKey] / 2) - kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance <= 0
2377
+ ) {
2378
+ agentNodeProperties.$Agent$Move$IsArrive = true;
2379
+
2380
+ // 非直穿,
2381
+ if (!agentNodeProperties.$Agent$Move$IsThrough) {
2382
+ param.agentNode[xyKey] = stationNode02[xyKey] - stationNode02.size[whKey] / 2 + param.agentNode.size[whKey] / 2 + kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance;
2383
+ agentNodeProperties.$Agent$Move$CurrentVelocity = 0;
2384
+ }
2385
+ // 是直穿,
2386
+ else {
2387
+ param.agentNode[xyKey] = stationNode02[xyKey] - stationNode02.size[whKey] / 2 + param.agentNode.size[whKey] / 2;
2388
+ }
2389
+ }
2390
+ // 尚未到达站点二,
2391
+ else {
2392
+ switch (true) {
2393
+ // 等待站点一上升,
2394
+ case station01NodeProperties.type === NODE_KEY.YZJ && edge.isPrimary && (station01NodeProperties.$YZJ$IsUpDoing || station01NodeProperties.$YZJ$IsDownDoing || station01NodeProperties.$YZJ$CurrentPosition === 'DOWN'): {
2395
+ // 正在上升, 等待,
2396
+ if (station01NodeProperties.$YZJ$IsUpDoing) {
2397
+ // N/A
2398
+ }
2399
+ // 正在下降, 等待,
2400
+ else if (station01NodeProperties.$YZJ$IsDownDoing) {
2401
+ // N/A
2402
+ }
2403
+ // 执行上升,
2404
+ else if (station01NodeProperties.$YZJ$CurrentPosition === 'DOWN') {
2405
+ station01NodeProperties.$YZJ$IsUpDoing = true;
2406
+ station01NodeProperties.$YZJ$IsDownDoing = false;
2407
+ setTimeout(() => {
2408
+ station01NodeProperties.$YZJ$IsUpDoing = undefined;
2409
+ station01NodeProperties.$YZJ$IsDownDoing = undefined;
2410
+ station01NodeProperties.$YZJ$CurrentPosition = 'UP';
2411
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2412
+ }, kgSimulator.$Config$CircularConveyor$JackUpTransferStation$Duration);
2413
+ }
2414
+
2415
+ break;
2416
+ }
2417
+
2418
+ // 等待站点一下降,
2419
+ case station01NodeProperties.type === NODE_KEY.YZJ && !edge.isPrimary && (station01NodeProperties.$YZJ$IsUpDoing || station01NodeProperties.$YZJ$IsDownDoing || station01NodeProperties.$YZJ$CurrentPosition === 'UP'): {
2420
+ // 正在上升, 等待,
2421
+ if (station01NodeProperties.$YZJ$IsUpDoing) {
2422
+ // N/A
2423
+ }
2424
+ // 正在下降, 等待,
2425
+ else if (station01NodeProperties.$YZJ$IsDownDoing) {
2426
+ // N/A
2427
+ }
2428
+ // 执行下降,
2429
+ else if (station01NodeProperties.$YZJ$CurrentPosition === 'UP') {
2430
+ station01NodeProperties.$YZJ$IsUpDoing = false;
2431
+ station01NodeProperties.$YZJ$IsDownDoing = true;
2432
+ setTimeout(() => {
2433
+ station01NodeProperties.$YZJ$IsUpDoing = undefined;
2434
+ station01NodeProperties.$YZJ$IsDownDoing = undefined;
2435
+ station01NodeProperties.$YZJ$CurrentPosition = 'DOWN';
2436
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2437
+ }, kgSimulator.$Config$CircularConveyor$JackUpTransferStation$Duration);
2438
+ }
2439
+
2440
+ break;
2441
+ }
2442
+
2443
+ // 等待站点二上升,
2444
+ case stationNode02Properties.type === NODE_KEY.YZJ && edge.isPrimary && (stationNode02Properties.$YZJ$IsUpDoing || stationNode02Properties.$YZJ$IsDownDoing || stationNode02Properties.$YZJ$CurrentPosition === 'DOWN'): {
2445
+ // 正在上升, 等待,
2446
+ if (stationNode02Properties.$YZJ$IsUpDoing) {
2447
+ // N/A
2448
+ }
2449
+ // 正在下降, 等待,
2450
+ else if (stationNode02Properties.$YZJ$IsDownDoing) {
2451
+ // N/A
2452
+ }
2453
+ // 执行上升,
2454
+ else if (stationNode02Properties.$YZJ$CurrentPosition === 'DOWN') {
2455
+ stationNode02Properties.$YZJ$IsUpDoing = true;
2456
+ stationNode02Properties.$YZJ$IsDownDoing = false;
2457
+ setTimeout(() => {
2458
+ stationNode02Properties.$YZJ$IsUpDoing = undefined;
2459
+ stationNode02Properties.$YZJ$IsDownDoing = undefined;
2460
+ stationNode02Properties.$YZJ$CurrentPosition = 'UP';
2461
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2462
+ }, kgSimulator.$Config$CircularConveyor$JackUpTransferStation$Duration);
2463
+ }
2464
+
2465
+ break;
2466
+ }
2467
+
2468
+ // 等待站点二下降,
2469
+ case stationNode02Properties.type === NODE_KEY.YZJ && !edge.isPrimary && (stationNode02Properties.$YZJ$IsUpDoing || stationNode02Properties.$YZJ$IsDownDoing || stationNode02Properties.$YZJ$CurrentPosition === 'UP'): {
2470
+ // 正在上升, 等待,
2471
+ if (stationNode02Properties.$YZJ$IsUpDoing) {
2472
+ // N/A
2473
+ }
2474
+ // 正在下降, 等待,
2475
+ else if (stationNode02Properties.$YZJ$IsDownDoing) {
2476
+ // N/A
2477
+ }
2478
+ // 执行下降,
2479
+ else if (stationNode02Properties.$YZJ$CurrentPosition === 'UP') {
2480
+ stationNode02Properties.$YZJ$IsUpDoing = false;
2481
+ stationNode02Properties.$YZJ$IsDownDoing = true;
2482
+ setTimeout(() => {
2483
+ stationNode02Properties.$YZJ$IsUpDoing = undefined;
2484
+ stationNode02Properties.$YZJ$IsDownDoing = undefined;
2485
+ stationNode02Properties.$YZJ$CurrentPosition = 'DOWN';
2486
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2487
+ }, kgSimulator.$Config$CircularConveyor$JackUpTransferStation$Duration);
2488
+ }
2489
+
2490
+ break;
2491
+ }
2492
+
2493
+ // 等待站点三上升,
2494
+ case stationNode03Properties?.type === NODE_KEY.YZJ && edge.isPrimary && (stationNode03Properties?.$YZJ$IsUpDoing || stationNode03Properties?.$YZJ$IsDownDoing || stationNode03Properties?.$YZJ$CurrentPosition === 'DOWN'): {
2495
+ // 正在上升, 等待,
2496
+ if (stationNode03Properties?.$YZJ$IsUpDoing) {
2497
+ // N/A
2498
+ }
2499
+ // 正在下降, 等待,
2500
+ else if (stationNode03Properties?.$YZJ$IsDownDoing) {
2501
+ // N/A
2502
+ }
2503
+ // 执行上升,
2504
+ else if (stationNode03Properties?.$YZJ$CurrentPosition === 'DOWN') {
2505
+ stationNode03Properties!.$YZJ$IsUpDoing = true;
2506
+ stationNode03Properties!.$YZJ$IsDownDoing = false;
2507
+ setTimeout(() => {
2508
+ stationNode03Properties!.$YZJ$IsUpDoing = undefined;
2509
+ stationNode03Properties!.$YZJ$IsDownDoing = undefined;
2510
+ stationNode03Properties!.$YZJ$CurrentPosition = 'UP';
2511
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2512
+ }, kgSimulator.$Config$CircularConveyor$JackUpTransferStation$Duration);
2513
+ }
2514
+
2515
+ break;
2516
+ }
2517
+
2518
+ // 等待站点三下降,
2519
+ case stationNode03Properties?.type === NODE_KEY.YZJ && !edge.isPrimary && (stationNode03Properties?.$YZJ$IsUpDoing || stationNode03Properties?.$YZJ$IsDownDoing || stationNode03Properties?.$YZJ$CurrentPosition === 'UP'): {
2520
+ // 正在上升, 等待,
2521
+ if (stationNode03Properties?.$YZJ$IsUpDoing) {
2522
+ // N/A
2523
+ }
2524
+ // 正在下降, 等待,
2525
+ else if (stationNode03Properties?.$YZJ$IsDownDoing) {
2526
+ // N/A
2527
+ }
2528
+ // 执行下降,
2529
+ else if (stationNode03Properties?.$YZJ$CurrentPosition === 'UP') {
2530
+ stationNode03Properties!.$YZJ$IsUpDoing = false;
2531
+ stationNode03Properties!.$YZJ$IsDownDoing = true;
2532
+ setTimeout(() => {
2533
+ stationNode03Properties!.$YZJ$IsUpDoing = undefined;
2534
+ stationNode03Properties!.$YZJ$IsDownDoing = undefined;
2535
+ stationNode03Properties!.$YZJ$CurrentPosition = 'DOWN';
2536
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2537
+ }, kgSimulator.$Config$CircularConveyor$JackUpTransferStation$Duration);
2538
+ }
2539
+
2540
+ break;
2541
+ }
2542
+
2543
+ default: {
2544
+ doAnimation$Agent$Move$Up$doMove(param);
2545
+ break;
2546
+ }
2547
+ }
2548
+ }
2549
+ }
2550
+
2551
+ /**
2552
+ * 应用动画效果--代理者--移动--向下--执行移动. 代理者移动的通用逻辑.
2553
+ *
2554
+ * @param param.agentNode 代理者节点.
2555
+ * @param param.direction 移动方向.
2556
+ */
2557
+ function doAnimation$Agent$Move$Down$doMove(param: { agentNode: Q.Node; direction: 'UP' | 'DOWN' | 'LEFT' | 'RIGHT' }) {
2558
+ const agentNodeProperties = param.agentNode.properties as INodeProperty;
2559
+ const edgeProperties = agentNodeProperties.$Agent$Move$CurrentEdge!.properties as INodeProperty;
2560
+ const station01NodeProperties = agentNodeProperties.$Agent$Move$CurrentEdge!.from.properties as INodeProperty;
2561
+ const stationNode02Properties = agentNodeProperties.$Agent$Move$CurrentEdge!.to.properties as INodeProperty;
2562
+
2563
+ const stationNode02 = agentNodeProperties.$Agent$Move$CurrentEdge!.to;
2564
+
2565
+ const station02 = stationNode02Properties.data as Station;
2566
+ const edge = edgeProperties.data as Edge;
2567
+
2568
+ // 高速速度,
2569
+ const fastVelocity = kgSimulator.$Config$CircularConveyor$Agent$GlobalMaxVelocity;
2570
+ // 低速速度,
2571
+ const slowVelocity = kgSimulator.$Config$CircularConveyor$Agent$GlobalMaxVelocity / 5;
2572
+ // 当前速度,
2573
+ const currentVelocity = agentNodeProperties.$Agent$Move$CurrentVelocity ?? 0;
2574
+
2575
+ const longDistanceSensorKey = doAnimation$Agent$Move$getLongDistanceSensorKey(param);
2576
+ const xyKey = doAnimation$Agent$Move$getXyKey(param);
2577
+ const whKey = doAnimation$Agent$Move$getWhKey(param);
2578
+
2579
+ // 远传感器,
2580
+ if (station02[longDistanceSensorKey]) {
2581
+ // 「代理者」边缘离「传感器」的距离,
2582
+ const distanceToCGQ = stationNode02[xyKey] + stationNode02.size[whKey] / 2 - (param.agentNode[xyKey] + param.agentNode.size[whKey] / 2) - kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$LongDistance;
2583
+ // 「代理者」边缘离「输送机」边缘的距离,
2584
+ const distanceToSSJ = stationNode02[xyKey] + stationNode02.size[whKey] / 2 - (param.agentNode[xyKey] + param.agentNode.size[whKey] / 2);
2585
+
2586
+ switch (true) {
2587
+ // 停止阶段,
2588
+ case distanceToSSJ <= 0: {
2589
+ agentNodeProperties.$Agent$Move$IsArrive = true;
2590
+
2591
+ // 非直穿,
2592
+ if (!agentNodeProperties.$Agent$Move$IsThrough) {
2593
+ param.agentNode[xyKey] = stationNode02[xyKey] + stationNode02.size[whKey] / 2 - param.agentNode.size[whKey] / 2;
2594
+ agentNodeProperties.$Agent$Move$CurrentVelocity = 0;
2595
+ }
2596
+ // 是直穿,
2597
+ else {
2598
+ param.agentNode[xyKey] = stationNode02[xyKey] + stationNode02.size[whKey] / 2 - param.agentNode.size[whKey] / 2;
2599
+ }
2600
+ break;
2601
+ }
2602
+
2603
+ // 减速阶段,
2604
+ case distanceToCGQ <= 0 && currentVelocity > slowVelocity: {
2605
+ // 非直穿,
2606
+ if (!agentNodeProperties.$Agent$Move$IsThrough) {
2607
+ // 本次移动距离,
2608
+ const distance = (() => {
2609
+ const elapse = Date.now() - agentNodeProperties.$Agent$Move$PreviousMoveTime!;
2610
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2611
+
2612
+ // 新的当前速度,
2613
+ const newCurrentVelocity = Math.max(slowVelocity, currentVelocity - kgSimulator.$Config$CircularConveyor$Agent$GlobalAcceleration * elapse);
2614
+ // 本次移动距离,
2615
+ const _distance = ((newCurrentVelocity + (currentVelocity - newCurrentVelocity)) / 2) * elapse;
2616
+
2617
+ agentNodeProperties.$Agent$Move$CurrentVelocity = newCurrentVelocity;
2618
+
2619
+ return _distance;
2620
+ })();
2621
+
2622
+ param.agentNode[xyKey] = param.agentNode[xyKey] + distance;
2623
+ }
2624
+ // 是直穿,
2625
+ else {
2626
+ // 本次移动距离,
2627
+ const distance = (() => {
2628
+ const elapse = Date.now() - agentNodeProperties.$Agent$Move$PreviousMoveTime!;
2629
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2630
+
2631
+ return fastVelocity * elapse;
2632
+ })();
2633
+
2634
+ param.agentNode[xyKey] = param.agentNode[xyKey] + distance;
2635
+ }
2636
+ break;
2637
+ }
2638
+
2639
+ // 低速阶段,
2640
+ case distanceToCGQ < 0 && currentVelocity === slowVelocity: {
2641
+ // 非直穿,
2642
+ if (!agentNodeProperties.$Agent$Move$IsThrough) {
2643
+ // 本次移动距离,
2644
+ const distance = (() => {
2645
+ const elapse = Date.now() - agentNodeProperties.$Agent$Move$PreviousMoveTime!;
2646
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2647
+
2648
+ return slowVelocity * elapse;
2649
+ })();
2650
+
2651
+ param.agentNode[xyKey] = param.agentNode[xyKey] + distance;
2652
+ }
2653
+ // 是直穿,
2654
+ else {
2655
+ // 本次移动距离,
2656
+ const distance = (() => {
2657
+ const elapse = Date.now() - agentNodeProperties.$Agent$Move$PreviousMoveTime!;
2658
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2659
+
2660
+ return fastVelocity * elapse;
2661
+ })();
2662
+
2663
+ param.agentNode[xyKey] = param.agentNode[xyKey] + distance;
2664
+ }
2665
+ break;
2666
+ }
2667
+
2668
+ // 高速阶段,
2669
+ case distanceToCGQ > 0 && currentVelocity === fastVelocity: {
2670
+ // 本次移动距离,
2671
+ const distance = (() => {
2672
+ const elapse = Date.now() - agentNodeProperties.$Agent$Move$PreviousMoveTime!;
2673
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2674
+
2675
+ return fastVelocity * elapse;
2676
+ })();
2677
+
2678
+ param.agentNode[xyKey] = param.agentNode[xyKey] + distance;
2679
+ break;
2680
+ }
2681
+
2682
+ // 加速阶段,
2683
+ case distanceToCGQ > 0 && currentVelocity < fastVelocity: {
2684
+ // 本次移动距离,
2685
+ const distance = (() => {
2686
+ const elapse = Date.now() - agentNodeProperties.$Agent$Move$PreviousMoveTime!;
2687
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2688
+
2689
+ // 新的当前速度,
2690
+ const newCurrentVelocity = Math.min(fastVelocity, currentVelocity + kgSimulator.$Config$CircularConveyor$Agent$GlobalAcceleration * elapse);
2691
+ // 本次移动距离,
2692
+ const _distance = ((currentVelocity + (newCurrentVelocity - currentVelocity)) / 2) * elapse;
2693
+
2694
+ agentNodeProperties.$Agent$Move$CurrentVelocity = newCurrentVelocity;
2695
+
2696
+ return _distance;
2697
+ })();
2698
+
2699
+ param.agentNode[xyKey] = param.agentNode[xyKey] + distance;
2700
+ break;
2701
+ }
2702
+ }
2703
+ }
2704
+ // 近传感器
2705
+ else {
2706
+ // 「代理者」边缘离「传感器」的距离,
2707
+ const distanceToCGQ = stationNode02[xyKey] + stationNode02.size[whKey] / 2 - (param.agentNode[xyKey] + param.agentNode.size[whKey] / 2) - kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance;
2708
+
2709
+ switch (true) {
2710
+ // 停止阶段,
2711
+ case distanceToCGQ <= 0: {
2712
+ agentNodeProperties.$Agent$Move$IsArrive = true;
2713
+
2714
+ // 非直穿,
2715
+ if (!agentNodeProperties.$Agent$Move$IsThrough) {
2716
+ param.agentNode[xyKey] = stationNode02[xyKey] + stationNode02.size[whKey] / 2 - param.agentNode.size[whKey] / 2 - kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance;
2717
+ agentNodeProperties.$Agent$Move$CurrentVelocity = 0;
2718
+ }
2719
+ // 是直穿,
2720
+ else {
2721
+ param.agentNode[xyKey] = stationNode02[xyKey] + stationNode02.size[whKey] / 2 - param.agentNode.size[whKey] / 2;
2722
+ }
2723
+ break;
2724
+ }
2725
+
2726
+ // 减速阶段,
2727
+ case distanceToCGQ <= kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance$StartDecelerateDistance && currentVelocity > slowVelocity: {
2728
+ // 非直穿,
2729
+ if (!agentNodeProperties.$Agent$Move$IsThrough) {
2730
+ // 本次移动距离,
2731
+ const distance = (() => {
2732
+ const elapse = Date.now() - agentNodeProperties.$Agent$Move$PreviousMoveTime!;
2733
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2734
+
2735
+ // 新的当前速度,
2736
+ const newCurrentVelocity = Math.max(slowVelocity, currentVelocity - kgSimulator.$Config$CircularConveyor$Agent$GlobalAcceleration * elapse);
2737
+ // 本次移动距离,
2738
+ const _distance = ((newCurrentVelocity + (currentVelocity - newCurrentVelocity)) / 2) * elapse;
2739
+
2740
+ agentNodeProperties.$Agent$Move$CurrentVelocity = newCurrentVelocity;
2741
+
2742
+ return _distance;
2743
+ })();
2744
+
2745
+ param.agentNode[xyKey] = param.agentNode[xyKey] + distance;
2746
+ }
2747
+ // 是直穿,
2748
+ else {
2749
+ // 本次移动距离,
2750
+ const distance = (() => {
2751
+ const elapse = Date.now() - agentNodeProperties.$Agent$Move$PreviousMoveTime!;
2752
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2753
+
2754
+ return fastVelocity * elapse;
2755
+ })();
2756
+
2757
+ param.agentNode[xyKey] = param.agentNode[xyKey] + distance;
2758
+ }
2759
+
2760
+ break;
2761
+ }
2762
+
2763
+ // 低速阶段,
2764
+ case distanceToCGQ < kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance$StartDecelerateDistance && currentVelocity === slowVelocity: {
2765
+ // 非直穿,
2766
+ if (!agentNodeProperties.$Agent$Move$IsThrough) {
2767
+ // 本次移动距离,
2768
+ const distance = (() => {
2769
+ const elapse = Date.now() - agentNodeProperties.$Agent$Move$PreviousMoveTime!;
2770
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2771
+
2772
+ return slowVelocity * elapse;
2773
+ })();
2774
+
2775
+ param.agentNode[xyKey] = param.agentNode[xyKey] + distance;
2776
+ }
2777
+ // 是直穿,
2778
+ else {
2779
+ // 本次移动距离,
2780
+ const distance = (() => {
2781
+ const elapse = Date.now() - agentNodeProperties.$Agent$Move$PreviousMoveTime!;
2782
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2783
+
2784
+ return fastVelocity * elapse;
2785
+ })();
2786
+
2787
+ param.agentNode[xyKey] = param.agentNode[xyKey] + distance;
2788
+ }
2789
+ break;
2790
+ }
2791
+
2792
+ // 高速阶段,
2793
+ case distanceToCGQ > kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance$StartDecelerateDistance && currentVelocity === fastVelocity: {
2794
+ // 本次移动距离,
2795
+ const distance = (() => {
2796
+ const elapse = Date.now() - agentNodeProperties.$Agent$Move$PreviousMoveTime!;
2797
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2798
+
2799
+ return fastVelocity * elapse;
2800
+ })();
2801
+
2802
+ param.agentNode[xyKey] = param.agentNode[xyKey] + distance;
2803
+ break;
2804
+ }
2805
+
2806
+ // 加速阶段,
2807
+ case distanceToCGQ > kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance$StartDecelerateDistance && currentVelocity < fastVelocity: {
2808
+ // 本次移动距离,
2809
+ const distance = (() => {
2810
+ const elapse = Date.now() - agentNodeProperties.$Agent$Move$PreviousMoveTime!;
2811
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2812
+
2813
+ // 新的当前速度,
2814
+ const newCurrentVelocity = Math.min(fastVelocity, currentVelocity + kgSimulator.$Config$CircularConveyor$Agent$GlobalAcceleration * elapse);
2815
+ // 本次移动距离,
2816
+ const _distance = ((currentVelocity + (newCurrentVelocity - currentVelocity)) / 2) * elapse;
2817
+
2818
+ agentNodeProperties.$Agent$Move$CurrentVelocity = newCurrentVelocity;
2819
+
2820
+ return _distance;
2821
+ })();
2822
+
2823
+ param.agentNode[xyKey] = param.agentNode[xyKey] + distance;
2824
+ break;
2825
+ }
2826
+ }
2827
+ }
2828
+ }
2829
+
2830
+ /**
2831
+ * 应用动画效果--代理者--移动--向下--从「任意设备」到「任意设备」.
2832
+ *
2833
+ * @param param.agentNode 代理者节点.
2834
+ * @param param.direction 移动方向.
2835
+ */
2836
+ function doAnimation$Agent$Move$Down$fromANYtoANY(param: { agentNode: Q.Node; direction: 'UP' | 'DOWN' | 'LEFT' | 'RIGHT'; stationNode03: Q.Node | null }) {
2837
+ const edgeProperties = (param.agentNode.properties as INodeProperty).$Agent$Move$CurrentEdge!.properties as INodeProperty;
2838
+ const agentNodeProperties = param.agentNode.properties as INodeProperty;
2839
+
2840
+ const station01NodeProperties = agentNodeProperties.$Agent$Move$CurrentEdge!.from.properties as INodeProperty;
2841
+
2842
+ const stationNode02 = agentNodeProperties.$Agent$Move$CurrentEdge!.to;
2843
+ const stationNode02Properties = agentNodeProperties.$Agent$Move$CurrentEdge!.to.properties as INodeProperty;
2844
+
2845
+ const stationNode03 = param.stationNode03;
2846
+ const stationNode03Properties = stationNode03?.properties as INodeProperty | null;
2847
+
2848
+ const edge = edgeProperties.data as Edge;
2849
+ const station02 = stationNode02Properties.data as Station;
2850
+
2851
+ const longDistanceSensorKey = doAnimation$Agent$Move$getLongDistanceSensorKey(param);
2852
+ const xyKey = doAnimation$Agent$Move$getXyKey(param);
2853
+ const whKey = doAnimation$Agent$Move$getWhKey(param);
2854
+
2855
+ // 已经到达站点二, 远传感器,
2856
+ if (station02[longDistanceSensorKey] && stationNode02[xyKey] + stationNode02.size[whKey] / 2 - (param.agentNode[xyKey] + param.agentNode.size[whKey] / 2) <= 0) {
2857
+ agentNodeProperties.$Agent$Move$IsArrive = true;
2858
+
2859
+ // 非直穿,
2860
+ if (!agentNodeProperties.$Agent$Move$IsThrough) {
2861
+ param.agentNode[xyKey] = stationNode02[xyKey] + stationNode02.size[whKey] / 2 - param.agentNode.size[whKey] / 2;
2862
+ agentNodeProperties.$Agent$Move$CurrentVelocity = 0;
2863
+ }
2864
+ // 是直穿,
2865
+ else {
2866
+ param.agentNode[xyKey] = stationNode02[xyKey] + stationNode02.size[whKey] / 2 - param.agentNode.size[whKey] / 2;
2867
+ }
2868
+ }
2869
+ // 已经到达站点二, 近传感器,
2870
+ else if (
2871
+ !station02[longDistanceSensorKey] &&
2872
+ stationNode02[xyKey] + stationNode02.size[whKey] / 2 - (param.agentNode[xyKey] + param.agentNode.size[whKey] / 2) - kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance <= 0
2873
+ ) {
2874
+ agentNodeProperties.$Agent$Move$IsArrive = true;
2875
+
2876
+ // 非直穿,
2877
+ if (!agentNodeProperties.$Agent$Move$IsThrough) {
2878
+ param.agentNode[xyKey] = stationNode02[xyKey] + stationNode02.size[whKey] / 2 - param.agentNode.size[whKey] / 2 - kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance;
2879
+ agentNodeProperties.$Agent$Move$CurrentVelocity = 0;
2880
+ }
2881
+ // 是直穿,
2882
+ else {
2883
+ param.agentNode[xyKey] = stationNode02[xyKey] + stationNode02.size[whKey] / 2 - param.agentNode.size[whKey] / 2;
2884
+ }
2885
+ }
2886
+ // 尚未到达站点二,
2887
+ else {
2888
+ switch (true) {
2889
+ // 等待站点一上升,
2890
+ case station01NodeProperties.type === NODE_KEY.YZJ && edge.isPrimary && (station01NodeProperties.$YZJ$IsUpDoing || station01NodeProperties.$YZJ$IsDownDoing || station01NodeProperties.$YZJ$CurrentPosition === 'DOWN'): {
2891
+ // 正在上升, 等待,
2892
+ if (station01NodeProperties.$YZJ$IsUpDoing) {
2893
+ // N/A
2894
+ }
2895
+ // 正在下降, 等待,
2896
+ else if (station01NodeProperties.$YZJ$IsDownDoing) {
2897
+ // N/A
2898
+ }
2899
+ // 执行上升,
2900
+ else if (station01NodeProperties.$YZJ$CurrentPosition === 'DOWN') {
2901
+ station01NodeProperties.$YZJ$IsUpDoing = true;
2902
+ station01NodeProperties.$YZJ$IsDownDoing = false;
2903
+ setTimeout(() => {
2904
+ station01NodeProperties.$YZJ$IsUpDoing = undefined;
2905
+ station01NodeProperties.$YZJ$IsDownDoing = undefined;
2906
+ station01NodeProperties.$YZJ$CurrentPosition = 'UP';
2907
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2908
+ }, kgSimulator.$Config$CircularConveyor$JackUpTransferStation$Duration);
2909
+ }
2910
+
2911
+ break;
2912
+ }
2913
+
2914
+ // 等待站点一下降,
2915
+ case station01NodeProperties.type === NODE_KEY.YZJ && !edge.isPrimary && (station01NodeProperties.$YZJ$IsUpDoing || station01NodeProperties.$YZJ$IsDownDoing || station01NodeProperties.$YZJ$CurrentPosition === 'UP'): {
2916
+ // 正在上升, 等待,
2917
+ if (station01NodeProperties.$YZJ$IsUpDoing) {
2918
+ // N/A
2919
+ }
2920
+ // 正在下降, 等待,
2921
+ else if (station01NodeProperties.$YZJ$IsDownDoing) {
2922
+ // N/A
2923
+ }
2924
+ // 执行下降,
2925
+ else if (station01NodeProperties.$YZJ$CurrentPosition === 'UP') {
2926
+ station01NodeProperties.$YZJ$IsUpDoing = false;
2927
+ station01NodeProperties.$YZJ$IsDownDoing = true;
2928
+ setTimeout(() => {
2929
+ station01NodeProperties.$YZJ$IsUpDoing = undefined;
2930
+ station01NodeProperties.$YZJ$IsDownDoing = undefined;
2931
+ station01NodeProperties.$YZJ$CurrentPosition = 'DOWN';
2932
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2933
+ }, kgSimulator.$Config$CircularConveyor$JackUpTransferStation$Duration);
2934
+ }
2935
+
2936
+ break;
2937
+ }
2938
+
2939
+ // 等待站点二上升,
2940
+ case stationNode02Properties.type === NODE_KEY.YZJ && edge.isPrimary && (stationNode02Properties.$YZJ$IsUpDoing || stationNode02Properties.$YZJ$IsDownDoing || stationNode02Properties.$YZJ$CurrentPosition === 'DOWN'): {
2941
+ // 正在上升, 等待,
2942
+ if (stationNode02Properties.$YZJ$IsUpDoing) {
2943
+ // N/A
2944
+ }
2945
+ // 正在下降, 等待,
2946
+ else if (stationNode02Properties.$YZJ$IsDownDoing) {
2947
+ // N/A
2948
+ }
2949
+ // 执行上升,
2950
+ else if (stationNode02Properties.$YZJ$CurrentPosition === 'DOWN') {
2951
+ stationNode02Properties.$YZJ$IsUpDoing = true;
2952
+ stationNode02Properties.$YZJ$IsDownDoing = false;
2953
+ setTimeout(() => {
2954
+ stationNode02Properties.$YZJ$IsUpDoing = undefined;
2955
+ stationNode02Properties.$YZJ$IsDownDoing = undefined;
2956
+ stationNode02Properties.$YZJ$CurrentPosition = 'UP';
2957
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2958
+ }, kgSimulator.$Config$CircularConveyor$JackUpTransferStation$Duration);
2959
+ }
2960
+
2961
+ break;
2962
+ }
2963
+
2964
+ // 等待站点二下降,
2965
+ case stationNode02Properties.type === NODE_KEY.YZJ && !edge.isPrimary && (stationNode02Properties.$YZJ$IsUpDoing || stationNode02Properties.$YZJ$IsDownDoing || stationNode02Properties.$YZJ$CurrentPosition === 'UP'): {
2966
+ // 正在上升, 等待,
2967
+ if (stationNode02Properties.$YZJ$IsUpDoing) {
2968
+ // N/A
2969
+ }
2970
+ // 正在下降, 等待,
2971
+ else if (stationNode02Properties.$YZJ$IsDownDoing) {
2972
+ // N/A
2973
+ }
2974
+ // 执行下降,
2975
+ else if (stationNode02Properties.$YZJ$CurrentPosition === 'UP') {
2976
+ stationNode02Properties.$YZJ$IsUpDoing = false;
2977
+ stationNode02Properties.$YZJ$IsDownDoing = true;
2978
+ setTimeout(() => {
2979
+ stationNode02Properties.$YZJ$IsUpDoing = undefined;
2980
+ stationNode02Properties.$YZJ$IsDownDoing = undefined;
2981
+ stationNode02Properties.$YZJ$CurrentPosition = 'DOWN';
2982
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
2983
+ }, kgSimulator.$Config$CircularConveyor$JackUpTransferStation$Duration);
2984
+ }
2985
+
2986
+ break;
2987
+ }
2988
+
2989
+ // 等待站点三上升,
2990
+ case stationNode03Properties?.type === NODE_KEY.YZJ && edge.isPrimary && (stationNode03Properties?.$YZJ$IsUpDoing || stationNode03Properties?.$YZJ$IsDownDoing || stationNode03Properties?.$YZJ$CurrentPosition === 'DOWN'): {
2991
+ // 正在上升, 等待,
2992
+ if (stationNode03Properties?.$YZJ$IsUpDoing) {
2993
+ // N/A
2994
+ }
2995
+ // 正在下降, 等待,
2996
+ else if (stationNode03Properties?.$YZJ$IsDownDoing) {
2997
+ // N/A
2998
+ }
2999
+ // 执行上升,
3000
+ else if (stationNode03Properties?.$YZJ$CurrentPosition === 'DOWN') {
3001
+ stationNode03Properties!.$YZJ$IsUpDoing = true;
3002
+ stationNode03Properties!.$YZJ$IsDownDoing = false;
3003
+ setTimeout(() => {
3004
+ stationNode03Properties!.$YZJ$IsUpDoing = undefined;
3005
+ stationNode03Properties!.$YZJ$IsDownDoing = undefined;
3006
+ stationNode03Properties!.$YZJ$CurrentPosition = 'UP';
3007
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
3008
+ }, kgSimulator.$Config$CircularConveyor$JackUpTransferStation$Duration);
3009
+ }
3010
+
3011
+ break;
3012
+ }
3013
+
3014
+ // 等待站点三下降,
3015
+ case stationNode03Properties?.type === NODE_KEY.YZJ && !edge.isPrimary && (stationNode03Properties?.$YZJ$IsUpDoing || stationNode03Properties?.$YZJ$IsDownDoing || stationNode03Properties?.$YZJ$CurrentPosition === 'UP'): {
3016
+ // 正在上升, 等待,
3017
+ if (stationNode03Properties?.$YZJ$IsUpDoing) {
3018
+ // N/A
3019
+ }
3020
+ // 正在下降, 等待,
3021
+ else if (stationNode03Properties?.$YZJ$IsDownDoing) {
3022
+ // N/A
3023
+ }
3024
+ // 执行下降,
3025
+ else if (stationNode03Properties?.$YZJ$CurrentPosition === 'UP') {
3026
+ stationNode03Properties!.$YZJ$IsUpDoing = false;
3027
+ stationNode03Properties!.$YZJ$IsDownDoing = true;
3028
+ setTimeout(() => {
3029
+ stationNode03Properties!.$YZJ$IsUpDoing = undefined;
3030
+ stationNode03Properties!.$YZJ$IsDownDoing = undefined;
3031
+ stationNode03Properties!.$YZJ$CurrentPosition = 'DOWN';
3032
+ agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
3033
+ }, kgSimulator.$Config$CircularConveyor$JackUpTransferStation$Duration);
3034
+ }
3035
+
3036
+ break;
3037
+ }
3038
+
3039
+ default: {
3040
+ doAnimation$Agent$Move$Down$doMove(param);
3041
+ break;
3042
+ }
3043
+ }
3044
+ }
3045
+ }
3046
+
3047
+ /**
3048
+ * 应用动画效果--代理者--移动--叠盘--从「任意站点」到「叠盘机」.
3049
+ *
3050
+ * @param param.agentNode 代理者节点.
3051
+ * @param param.stationNode02 站点二节点, 是叠盘机.
3052
+ */
3053
+ function doAnimation$Agent$Move$fromANYtoDPJ(param: { agentNode: Q.Node; stationNode02: Q.Node }) {
3054
+ const agentNodeProperties = param.agentNode.properties as INodeProperty;
3055
+ const stationNode02Properties = param.stationNode02.properties as INodeProperty;
3056
+
3057
+ const agent = agentNodeProperties.data as Agent;
3058
+
3059
+ // 已经到达站点二,
3060
+ if (param.agentNode.x === param.stationNode02.x && param.agentNode.y === param.stationNode02.y) {
3061
+ agentNodeProperties.$Agent$Move$IsArrive = true;
3062
+ }
3063
+ // 尚未到达站点二,
3064
+ else {
3065
+ // 正在叠盘, 原地等待,
3066
+ if (stationNode02Properties.$DPJ$IsInDoing) {
3067
+ // N/A
3068
+ }
3069
+ // 正在拆盘, 原地等待,
3070
+ else if (stationNode02Properties.$DPJ$IsOutDoing) {
3071
+ // N/A
3072
+ }
3073
+ // 执行叠盘,
3074
+ else if (agentNodeProperties.$Agent$Move$Direction === 'DPJ') {
3075
+ stationNode02Properties.$DPJ$IsInDoing = true;
3076
+ stationNode02Properties.$DPJ$IsOutDoing = false;
3077
+
3078
+ setTimeout(() => {
3079
+ param.agentNode.x = param.stationNode02.x;
3080
+ param.agentNode.y = param.stationNode02.y;
3081
+
3082
+ stationNode02Properties.$DPJ$IsInDoing = undefined;
3083
+ stationNode02Properties.$DPJ$IsOutDoing = undefined;
3084
+ stationNode02Properties.$DPJ$CurrentAgentId = agent.id!;
3085
+ }, kgSimulator.$Config$CircularConveyor$PalletStackerStation$Duration);
3086
+ } else {
3087
+ // N/A
3088
+ }
3089
+ }
3090
+ }
3091
+
3092
+ /**
3093
+ * 应用动画效果--代理者--移动--拆盘--从「叠盘机」到「任意站点」.
3094
+ *
3095
+ * @param param.agentNode 代理者节点.
3096
+ * @param param.stationNode02 站点二节点.
3097
+ */
3098
+ function doAnimation$Agent$Move$fromDPJtoANY(param: { agentNode: Q.Node; stationNode02: Q.Node }) {
3099
+ const agentNodeProperties = param.agentNode.properties as INodeProperty;
3100
+ const agent = agentNodeProperties.data as Agent;
3101
+
3102
+ const stationNode02Properties = param.stationNode02.properties as INodeProperty;
3103
+
3104
+ // 已经到达站点二,
3105
+ if (param.agentNode.x === param.stationNode02.x && param.agentNode.y === param.stationNode02.y) {
3106
+ agentNodeProperties.$Agent$Move$IsArrive = true;
3107
+ }
3108
+ // 尚未到达站点二,
3109
+ else {
3110
+ const dpjNode = kgSimulator
3111
+ .get$graph()!
3112
+ .graphModel.datas.find(
3113
+ (i) =>
3114
+ i.x === param.agentNode.x &&
3115
+ i.y === param.agentNode.y &&
3116
+ (i.properties as INodeProperty).type === NODE_KEY.DPJ &&
3117
+ (i.properties as INodeProperty).data.id !== stationNode02Properties.data.id &&
3118
+ (i.properties as INodeProperty).data.id !== agent.id,
3119
+ );
3120
+ if (!dpjNode) {
3121
+ ____ERROR____(`KgSimulatorCanvas | 动画效果--代理者--移动--拆盘--从「叠盘机」到「任意站点」 | 找不到叠盘机「${agentNodeProperties.$Agent$Move$station01Code}」`);
3122
+ } else {
3123
+ const dpjNodeProperties = dpjNode.properties as INodeProperty;
3124
+
3125
+ // 正在叠盘, 原地等待,
3126
+ if (dpjNodeProperties.$DPJ$IsInDoing) {
3127
+ // N/A
3128
+ }
3129
+ // 正在拆盘, 原地等待,
3130
+ else if (dpjNodeProperties.$DPJ$IsOutDoing) {
3131
+ // N/A
3132
+ }
3133
+ // 执行拆盘,
3134
+ else if (agentNodeProperties.$Agent$Move$Direction === 'DPJ') {
3135
+ dpjNodeProperties.$DPJ$IsInDoing = false;
3136
+ dpjNodeProperties.$DPJ$IsOutDoing = true;
3137
+
3138
+ setTimeout(() => {
3139
+ dpjNodeProperties.$DPJ$IsInDoing = undefined;
3140
+ dpjNodeProperties.$DPJ$IsOutDoing = undefined;
3141
+ dpjNodeProperties.$DPJ$CurrentAgentId = undefined;
3142
+
3143
+ param.agentNode.x = param.stationNode02.x;
3144
+ param.agentNode.y = param.stationNode02.y;
3145
+ }, kgSimulator.$Config$CircularConveyor$PalletStackerStation$Duration);
3146
+ } else {
3147
+ // N/A
3148
+ }
3149
+ }
3150
+ }
3151
+ }
3152
+
3153
+ /**
3154
+ * 应用动画效果--代理者--移动--获取当前所在连线.
3155
+ */
3156
+ function doAnimation$Agent$Move$getCurrentEdge(param: { agent: Agent; agentNodeProperties: INodeProperty; station01Node: Q.Node; stationNode02: Q.Node }): Q.Edge | undefined {
3157
+ let currentEdge: Q.Edge | undefined;
3158
+
3159
+ if (param.agentNodeProperties.$Agent$Move$CurrentEdge) {
3160
+ currentEdge = param.agentNodeProperties.$Agent$Move$CurrentEdge;
3161
+ } else {
3162
+ currentEdge = kgSimulator.get$graph()!.graphModel.datas.find((i) => i instanceof Q.Edge && (i.properties as INodeProperty).type === NODE_KEY.EDGE && i.from === param.station01Node && i.to === param.stationNode02);
3163
+ }
3164
+
3165
+ if (!currentEdge) {
3166
+ ____ERROR____(`KgSimulatorCanvas | 动画效果--代理者--移动 | 「${param.agent.code}」当前所在连线为空`);
3167
+ }
3168
+
3169
+ return currentEdge;
3170
+ }
3171
+
3172
+ /**
3173
+ * 应用动画效果--代理者--移动--获取是否远距离传感器的属性名.
3174
+ */
3175
+ function doAnimation$Agent$Move$getLongDistanceSensorKey(param: { direction: 'UP' | 'DOWN' | 'LEFT' | 'RIGHT' }): 'isLongDistanceSensorOnX' | 'isLongDistanceSensorOnY' {
3176
+ switch (param.direction) {
3177
+ case 'UP':
3178
+ case 'DOWN':
3179
+ return 'isLongDistanceSensorOnY';
3180
+
3181
+ case 'LEFT':
3182
+ case 'RIGHT':
3183
+ return 'isLongDistanceSensorOnX';
3184
+
3185
+ default: {
3186
+ throw new Error(`不支持的移动方向「${param.direction}」`);
3187
+ }
3188
+ }
3189
+ }
3190
+
3191
+ /**
3192
+ * 应用动画效果--代理者--移动--获取要移动的坐标方向的属性名.
3193
+ */
3194
+ function doAnimation$Agent$Move$getXyKey(param: { direction: 'UP' | 'DOWN' | 'LEFT' | 'RIGHT' }): 'x' | 'y' {
3195
+ switch (param.direction) {
3196
+ case 'UP':
3197
+ case 'DOWN':
3198
+ return 'y';
3199
+
3200
+ case 'LEFT':
3201
+ case 'RIGHT':
3202
+ return 'x';
3203
+
3204
+ default: {
3205
+ throw new Error(`不支持的移动方向「${param.direction}」`);
3206
+ }
3207
+ }
3208
+ }
3209
+ /**
3210
+ * 应用动画效果--代理者--移动--获取要移动的宽高方向的属性名.
3211
+ */
3212
+ function doAnimation$Agent$Move$getWhKey(param: { direction: 'UP' | 'DOWN' | 'LEFT' | 'RIGHT' }): 'width' | 'height' {
3213
+ switch (param.direction) {
3214
+ case 'UP':
3215
+ case 'DOWN':
3216
+ return 'height';
3217
+
3218
+ case 'LEFT':
3219
+ case 'RIGHT':
3220
+ return 'width';
3221
+
3222
+ default: {
3223
+ throw new Error(`不支持的移动方向「${param.direction}」`);
3224
+ }
3225
+ }
3226
+ }
3227
+
3228
+ /**
3229
+ * 应用动画效果--代理者--移动.
3230
+ */
3231
+ function doAnimation$Agent$Move() {
3232
+ try {
3233
+ if (kgSimulator.$Mode$IsSimulate && kgSimulator.$Mode$Simulate$IsRunning) {
3234
+ kgSimulator.get$graph()?.forEach((agentNode: Q.Node) => {
3235
+ const agentNodeProperties = agentNode.properties as INodeProperty;
3236
+
3237
+ switch (agentNodeProperties.type) {
3238
+ case NODE_KEY.DLZ: {
3239
+ const agent = agentNodeProperties.data as Agent;
3240
+
3241
+ // 代理者没有在移动, 无需绘制移动动画效果,
3242
+ if (!agentNodeProperties.$Agent$Move$IsMoveDoing) {
3243
+ break;
3244
+ }
3245
+
3246
+ // 站点一节点,
3247
+ const station01Node = kgSimulator.get$graph()!.graphModel.datas.find((i) => i instanceof Q.Node && (i.properties as INodeProperty).data.code === agentNodeProperties.$Agent$Move$station01Code);
3248
+ if (!station01Node) {
3249
+ ____ERROR____(`KgSimulatorCanvas | 动画效果--代理者--移动 | 起始节点「${agentNodeProperties.$Agent$Move$station01Code}」为空`);
3250
+ }
3251
+
3252
+ // 站点二节点,
3253
+ const stationNode02 = kgSimulator.get$graph()!.graphModel.datas.find((i) => i instanceof Q.Node && (i.properties as INodeProperty).data.code === agentNodeProperties.$Agent$Move$station02Code);
3254
+ if (!stationNode02) {
3255
+ ____ERROR____(`KgSimulatorCanvas | 动画效果--代理者--移动 | 目标节点「${agentNodeProperties.$Agent$Move$station02Code}」为空`);
3256
+ }
3257
+
3258
+ // 站点三节点,
3259
+ const stationNode03: Q.Node | null =
3260
+ kgSimulator.get$graph()!.graphModel.datas.find((i) => i instanceof Q.Node && (i.properties as INodeProperty).data.code === agentNodeProperties.$Agent$Move$station03Code) ?? null;
3261
+
3262
+ // 当前所在连线,
3263
+ agentNodeProperties.$Agent$Move$CurrentEdge = doAnimation$Agent$Move$getCurrentEdge({ agent: agent, agentNodeProperties: agentNodeProperties, station01Node: station01Node, stationNode02: stationNode02 });
3264
+ if (!agentNodeProperties.$Agent$Move$CurrentEdge) {
3265
+ break;
3266
+ }
3267
+
3268
+ const stationNode02Properties = stationNode02.properties as INodeProperty;
3269
+
3270
+ switch (agentNodeProperties.$Agent$Move$Direction) {
3271
+ //region 叠盘拆盘
3272
+ //----------------------------------------------------------------------------------------------------
3273
+ case 'DPJ': {
3274
+ switch (true) {
3275
+ // 叠盘
3276
+ case stationNode02Properties.type === NODE_KEY.DPJ: {
3277
+ doAnimation$Agent$Move$fromANYtoDPJ({ agentNode: agentNode, stationNode02: stationNode02 });
3278
+ break;
3279
+ }
3280
+
3281
+ // 拆盘
3282
+ case stationNode02Properties.type !== NODE_KEY.DPJ: {
3283
+ doAnimation$Agent$Move$fromDPJtoANY({ agentNode: agentNode, stationNode02: stationNode02 });
3284
+ break;
3285
+ }
3286
+ }
3287
+ break;
3288
+ }
3289
+ //----------------------------------------------------------------------------------------------------
3290
+ //endregion
3291
+
3292
+ //region 向上向左
3293
+ //----------------------------------------------------------------------------------------------------
3294
+ case 'UP':
3295
+ case 'LEFT': {
3296
+ doAnimation$Agent$Move$Up$fromANYtoANY({ agentNode: agentNode, direction: agentNodeProperties.$Agent$Move$Direction, stationNode03: stationNode03 });
3297
+ break;
3298
+ }
3299
+ //----------------------------------------------------------------------------------------------------
3300
+ //endregion
3301
+
3302
+ //region 向下向右
3303
+ //----------------------------------------------------------------------------------------------------
3304
+ case 'DOWN':
3305
+ case 'RIGHT': {
3306
+ doAnimation$Agent$Move$Down$fromANYtoANY({ agentNode: agentNode, direction: agentNodeProperties.$Agent$Move$Direction, stationNode03: stationNode03 });
3307
+ break;
3308
+ }
3309
+ //----------------------------------------------------------------------------------------------------
3310
+ //endregion
3311
+ }
3312
+
3313
+ //region 到达站点二
3314
+ //----------------------------------------------------------------------------------------------------
3315
+ if (agentNodeProperties.$Agent$Move$IsArrive) {
3316
+ agentNodeProperties.$Agent$Move$station01Code = agentNodeProperties.$Agent$Move$station02Code;
3317
+
3318
+ agentNodeProperties.$Agent$Move$CurrentEdge = undefined;
3319
+ agentNodeProperties.$Agent$Move$Direction = undefined;
3320
+ agentNodeProperties.$Agent$Move$IsArrive = undefined;
3321
+ agentNodeProperties.$Agent$Move$IsMoveDoing = false;
3322
+ agentNodeProperties.$Agent$Move$IsThrough = undefined;
3323
+ agentNodeProperties.$Agent$Move$station02Code = undefined;
3324
+ agentNodeProperties.$Agent$Move$station03Code = undefined;
3325
+
3326
+ kgSimulator.$WebSocket$getConnection()?.send(
3327
+ JSON.stringify(
3328
+ new WebSocketMessage({
3329
+ type: WEBSOCKET_PING_TYPE.AGENT_STATUS_UPDATE_REQUEST,
3330
+ data: new AgentStatusUpdateRequest({
3331
+ agentId: agent.code,
3332
+ angle: agent.angle,
3333
+ stationCode: agentNodeProperties.$Agent$Move$station01Code,
3334
+ x: agentNode.x,
3335
+ y: agentNode.y,
3336
+ z: agent.z,
3337
+ }),
3338
+ }),
3339
+ ),
3340
+ );
3341
+ }
3342
+ //----------------------------------------------------------------------------------------------------
3343
+ //endregion
3344
+
3345
+ break;
3346
+ }
3347
+ }
3348
+ });
3349
+ }
3350
+ } catch (e: any) {
3351
+ ____ERROR____(`KgSimulatorCanvas | 动画效果--代理者--移动 | ${e.message}`);
3352
+ console.error(e);
3353
+ }
3354
+
3355
+ $Animation$Agent$Move$Timer = window.setTimeout(() => {
3356
+ doAnimation$Agent$Move();
3357
+ }, 0);
3358
+ }
3359
+
3360
+ if ($Animation$Agent$Move$Timer && $Animation$Agent$Move$Timer !== -1) {
3361
+ clearTimeout($Animation$Agent$Move$Timer);
3362
+ }
3363
+
3364
+ doAnimation$Agent$Move();
3365
+ //----------------------------------------------------------------------------------------------------
3366
+ //endregion
3367
+
3368
+ // ----------------------------------------------------------------------------------------------------
3369
+ //endregion
3370
+
3371
+ return {
3372
+ $CircularConveyor$drawCGQ: $CircularConveyor$drawCGQ,
3373
+ $CircularConveyor$drawCJZ: $CircularConveyor$drawCJZ,
3374
+ $CircularConveyor$drawDLZ: $CircularConveyor$drawDLZ,
3375
+ $CircularConveyor$drawDPJ: $CircularConveyor$drawDPJ,
3376
+ $CircularConveyor$drawSSJ: $CircularConveyor$drawSSJ,
3377
+ $CircularConveyor$drawXHZ: $CircularConveyor$drawXHZ,
3378
+ $CircularConveyor$drawYZJ: $CircularConveyor$drawYZJ,
3379
+ draw: (param?: { isZoomToOverview?: boolean }) => {
3380
+ if (!kgSimulator.get$graph()) {
3381
+ return;
3382
+ }
3383
+
3384
+ switch (true) {
3385
+ case kgSimulator.$Config$Env$IsCircularConveyor: {
3386
+ $CircularConveyor$draw(param);
3387
+ break;
3388
+ }
3389
+
3390
+ case kgSimulator.$Config$Env$IsCircularShuttle: {
3391
+ circularShuttle$Draw(param);
3392
+ break;
3393
+ }
3394
+
3395
+ default: {
3396
+ break;
3397
+ }
3398
+ }
3399
+ },
3400
+ };
3401
+ }
3402
+ //----------------------------------------------------------------------------------------------------
3403
+ //endregion