@kengic/vue 0.30.1-beta.96 → 0.31.0
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.
- package/CHANGELOG.md +470 -0
- package/README.md +10 -0
- package/bin/bin.mjs +9 -24
- package/bin/postinstall.mjs +24 -4
- package/dist/aim-outlined.8d38a0f9.mjs +8 -0
- package/dist/align-left-outlined.579b01c6.mjs +8 -0
- package/dist/audit-outlined.4555f723.mjs +8 -0
- package/dist/bubble-loading.cd2fe007.mjs +8 -0
- package/dist/bulb-outlined.a5bf22d8.mjs +8 -0
- package/dist/card-text-outline.6e053122.mjs +8 -0
- package/dist/caret-down-outlined.c0564a3f.mjs +8 -0
- package/dist/caret-left-outlined.35b1d7d1.mjs +8 -0
- package/dist/caret-right-filled.dbbda237.mjs +8 -0
- package/dist/caret-right-outlined-Btgsw6a_.7ce8e8fe.mjs +8 -0
- package/dist/caret-right-outlined.12fe6699.mjs +8 -0
- package/dist/caret-up-outlined.81b559ad.mjs +8 -0
- package/dist/check-box-outline-blank.d01a2055.mjs +8 -0
- package/dist/check-circle-outlined.b219949f.mjs +8 -0
- package/dist/check-outlined.59c42074.mjs +8 -0
- package/dist/check-square-outlined.233589d8.mjs +8 -0
- package/dist/checkbox-indeterminate.e5386a53.mjs +8 -0
- package/dist/clock-circle-outline.b9d0b3dc.mjs +8 -0
- package/dist/close-circle-outlined.85f75690.mjs +8 -0
- package/dist/close-outlined-DMcSQWxQ.ce961fd1.mjs +8 -0
- package/dist/close-outlined.5757472a.mjs +8 -0
- package/dist/collapse-all-rounded.26ee73fc.mjs +8 -0
- package/dist/control-outlined.d66ac4d2.mjs +8 -0
- package/dist/copy-filled.a3dcd299.mjs +8 -0
- package/dist/copy-outlined.6a695d8a.mjs +8 -0
- package/dist/delete-outlined.20afb717.mjs +8 -0
- package/dist/delete-twotone.1d40696a.mjs +8 -0
- package/dist/double-right-outlined.f057a6b2.mjs +8 -0
- package/dist/down-circle-outlined.8ba93393.mjs +8 -0
- package/dist/download-outlined.e78b5364.mjs +8 -0
- package/dist/edit-outlined.0aae2217.mjs +8 -0
- package/dist/edit-twotone.67c952fa.mjs +8 -0
- package/dist/email-resend-outline.780506de.mjs +8 -0
- package/dist/exception-outlined.8c0003a2.mjs +8 -0
- package/dist/exclamation-circle-outlined-DZrXCnvM.07559897.mjs +8 -0
- package/dist/expand-all-rounded.e01e6cb9.mjs +8 -0
- package/dist/eye-invisible-outlined.5f8d6151.mjs +8 -0
- package/dist/eye-outlined.b25b4d28.mjs +8 -0
- package/dist/file-text-outline.2fbccab6.mjs +8 -0
- package/dist/fit-screen-outline.7341560f.mjs +8 -0
- package/dist/fullscreen-exit-outlined-X1iYkFc4.d7884311.mjs +8 -0
- package/dist/fullscreen-exit-outlined.b77fa876.mjs +8 -0
- package/dist/fullscreen-outlined-DDBrsRcy.d174b06a.mjs +8 -0
- package/dist/fullscreen-outlined.cd572ef8.mjs +8 -0
- package/dist/holder-outlined.9e698750.mjs +8 -0
- package/dist/index.css +1 -0
- package/dist/info-circle-outlined.7ddbd554.mjs +8 -0
- package/dist/kengic-vue.js +224275 -0
- package/dist/key-return-thin.ce6f074c.mjs +8 -0
- package/dist/loading-outlined.13a15197.mjs +8 -0
- package/dist/more-outlined.8e1202ac.mjs +8 -0
- package/dist/one-to-one-outlined.ac265beb.mjs +8 -0
- package/dist/palette-swatch-variant.f7258843.mjs +8 -0
- package/dist/partition-outlined.1bcf4f37.mjs +8 -0
- package/dist/pause-circle-outlined.cd534f5f.mjs +8 -0
- package/dist/pause-outlined.fca0d0f9.mjs +8 -0
- package/dist/pause-rounded.1ed7cc39.mjs +8 -0
- package/dist/play-arrow-rounded.90fc4173.mjs +8 -0
- package/dist/plus-outlined.bdaa6481.mjs +8 -0
- package/dist/printer-outlined.a8d0d92b.mjs +8 -0
- package/dist/profile-outlined.1059fb0d.mjs +8 -0
- package/dist/project/build/generate/generateModifyVars.ts +39 -0
- package/dist/project/index.ts +1 -0
- package/dist/project/types/global.d.ts +184 -0
- package/dist/release-gate-check.8c1ba629.mjs +8 -0
- package/dist/reload-outlined.d320578b.mjs +8 -0
- package/dist/retweet-outlined.bfa9b123.mjs +8 -0
- package/dist/save-as-outline-rounded.c65d61b2.mjs +8 -0
- package/dist/save-outline-rounded.c9c3f880.mjs +8 -0
- package/dist/search-outlined-Od1M_oxf.4a68e7e4.mjs +8 -0
- package/dist/search-outlined.ba5c5a3f.mjs +8 -0
- package/dist/setting-outlined.a3caf743.mjs +8 -0
- package/dist/src/api/WMS/Controllers/DescriptionController/List.d.ts +51 -0
- package/dist/src/api/WMS/Controllers/DescriptionController/ListByCodeNamesAndCodeValues.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/DescriptionController/index.d.ts +2 -0
- package/dist/src/api/WMS/Controllers/SqlClientController/Execute.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/SqlClientController/ExecutePage.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/SqlClientController/index.d.ts +2 -0
- package/dist/src/api/WMS/Controllers/SysPermissionController/List.d.ts +73 -0
- package/dist/src/api/WMS/Controllers/SysPermissionController/index.d.ts +1 -0
- package/dist/src/api/WMS/Controllers/VarConfigDescriptionController/Add.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarConfigDescriptionController/ListByFormId.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarConfigPossibilityController/ExecuteQuery.d.ts +18 -0
- package/dist/src/api/WMS/Controllers/VarConfigPossibilityController/index.d.ts +1 -0
- package/dist/src/api/WMS/Controllers/VarController/GetAll.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarController/index.d.ts +1 -0
- package/dist/src/api/WMS/Controllers/VarDdaController/Create.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarDdaController/GetResultSetMetadataFromSql.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarDdaController/ValidateCopySql.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarDdaController/ValidateCreateSql.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarDdaController/ValidateDeleteSql.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarDdaController/ValidateFrmId.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarDdaController/ValidateSearchSql.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarDdaController/ValidateUpdateSql.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarDdaController/ValidateVarButtonVarName.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarDdaController/index.d.ts +9 -0
- package/dist/src/api/WMS/Controllers/VarGridMasterController/QueryByID.d.ts +19 -0
- package/dist/src/api/WMS/Controllers/VarGridMasterController/Update.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarGridMasterController/index.d.ts +2 -0
- package/dist/src/api/WMS/Controllers/VarProfileMasterController/QueryByID.d.ts +19 -0
- package/dist/src/api/WMS/Controllers/VarProfileMasterController/index.d.ts +1 -0
- package/dist/src/api/WMS/Controllers/VarVariableController/Delete.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarVariableController/index.d.ts +1 -0
- package/dist/src/api/WMS/Controllers/WarehouseController/ListVO.d.ts +25 -0
- package/dist/src/api/WMS/Controllers/WorkstationController/List.d.ts +25 -0
- package/dist/src/api/WMS/Controllers/WorkstationController/index.d.ts +1 -0
- package/dist/src/api/WMS/index.d.ts +2 -0
- package/dist/src/api/WMS/models.d.ts +1128 -0
- package/dist/src/api/api.d.ts +1 -0
- package/dist/src/api/def.d.ts +1 -0
- package/dist/src/api/index.d.ts +2 -0
- package/dist/src/component/KgAppSelect/KgAppSelect.d.ts +46 -0
- package/dist/src/component/KgAppSelect/KgAppSelect.event.d.ts +31 -0
- package/dist/src/component/KgAppSelect/KgAppSelect.hooks.d.ts +18 -0
- package/dist/src/component/KgAppSelect/KgAppSelect.store.d.ts +33 -0
- package/dist/src/component/KgAppSelect/index.d.ts +3 -0
- package/dist/src/component/KgButton/KgButton.Copy.d.ts +40 -0
- package/dist/src/component/KgButton/KgButton.Create.d.ts +40 -0
- package/dist/src/component/KgButton/KgButton.Delete.d.ts +40 -0
- package/dist/src/component/KgButton/KgButton.Export.d.ts +40 -0
- package/dist/src/component/KgButton/KgButton.Import.d.ts +40 -0
- package/dist/src/component/KgButton/KgButton.ImportTemplate.d.ts +40 -0
- package/dist/src/component/KgButton/KgButton.Item.d.ts +39 -0
- package/dist/src/component/KgButton/KgButton.Other.d.ts +40 -0
- package/dist/src/component/KgButton/KgButton.Search.d.ts +40 -0
- package/dist/src/component/KgButton/KgButton.Update.d.ts +40 -0
- package/dist/src/component/KgButton/KgButton.d.ts +39 -0
- package/dist/src/component/KgButton/KgButton.event.d.ts +81 -0
- package/dist/src/component/KgButton/KgButton.hooks.d.ts +67 -0
- package/dist/src/component/KgButton/KgButton.model.d.ts +31 -0
- package/dist/src/component/KgButton/KgButton.store.d.ts +92 -0
- package/dist/src/component/KgCanvas/KgCanvas.ContextMenu.d.ts +100 -0
- package/dist/src/component/KgCanvas/KgCanvas.ToolbarButton.Fullscreen.d.ts +37 -0
- package/dist/src/component/KgCanvas/KgCanvas.ToolbarButton.Mode.d.ts +7 -0
- package/dist/src/component/KgCanvas/KgCanvas.ToolbarButton.OverviewScale.d.ts +37 -0
- package/dist/src/component/KgCanvas/KgCanvas.Tooltip.d.ts +27 -0
- package/dist/src/component/KgCanvas/KgCanvas.d.ts +232 -0
- package/dist/src/component/KgCanvas/KgCanvas.event.d.ts +216 -0
- package/dist/src/component/KgCanvas/KgCanvas.hooks.d.ts +100 -0
- package/dist/src/component/KgCanvas/KgCanvas.model.d.ts +27 -0
- package/dist/src/component/KgCanvas/KgCanvas.service.d.ts +17 -0
- package/dist/src/component/KgCanvas/KgCanvas.store.d.ts +9 -0
- package/dist/src/component/KgCanvas/index.d.ts +4 -0
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.AreaSelect.d.ts +5 -0
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Canvas.d.ts +5 -0
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Canvas.service.d.ts +63 -0
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Legend.d.ts +5 -0
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Offline.d.ts +5 -0
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Setting.d.ts +5 -0
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Tab.Log.d.ts +5 -0
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Tab.Rgv.d.ts +33 -0
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.d.ts +5 -0
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.hooks.d.ts +29 -0
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.model.d.ts +127 -0
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.store.d.ts +354 -0
- package/dist/src/component/KgCircularShuttleMonitor/index.d.ts +3 -0
- package/dist/src/component/KgForm/KgForm.d.ts +413 -0
- package/dist/src/component/KgForm/KgForm.event.d.ts +202 -0
- package/dist/src/component/KgForm/KgForm.hooks.d.ts +92 -0
- package/dist/src/component/KgForm/KgForm.store.d.ts +23 -0
- package/dist/src/component/KgForm/index.d.ts +4 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.Addon.DynamicQueryOperator.d.ts +49 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.Addon.Lookup.Modal.d.ts +16 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.Addon.Lookup.d.ts +31 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.Checkbox.d.ts +98 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.CheckboxGroup.d.ts +95 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.Date.d.ts +95 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.DateRange.d.ts +95 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.Image.d.ts +90 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.Input.d.ts +94 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.InputNumber.d.ts +94 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.InputPassword.d.ts +94 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.Link.d.ts +93 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.RadioGroup.d.ts +96 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.Select.d.ts +95 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.Select.service.d.ts +28 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.Switch.d.ts +94 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.TextArea.d.ts +94 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.d.ts +95 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.model.d.ts +111 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.service.d.ts +17 -0
- package/dist/src/component/KgImage/KgImage.d.ts +100 -0
- package/dist/src/component/KgLayoutHeader/KgLayoutHeader.Locale.d.ts +38 -0
- package/dist/src/component/KgLayoutHeader/KgLayoutHeader.hooks.d.ts +4 -0
- package/dist/src/component/KgLayoutHeader/index.d.ts +2 -0
- package/dist/src/component/KgModal/KgModal.d.ts +817 -0
- package/dist/src/component/KgModal/KgModal.model.d.ts +8 -0
- package/dist/src/component/KgModal/KgModal.service.d.ts +37 -0
- package/dist/src/component/KgModal/KgModalHeaderButtons.d.ts +92 -0
- package/dist/src/component/KgModal02/KgModal02.d.ts +470 -0
- package/dist/src/component/KgModal02/KgModal02.model.d.ts +1 -0
- package/dist/src/component/KgProgressA/KgProgressA.d.ts +85 -0
- package/dist/src/component/KgResizable/KgResizable.d.ts +119 -0
- package/dist/src/component/KgResizable/KgResizable.service.d.ts +12 -0
- package/dist/src/component/KgSearch/KgSearch.d.ts +26 -0
- package/dist/src/component/KgSearch/KgSearch.event.d.ts +31 -0
- package/dist/src/component/KgSearch/KgSearch.hooks.d.ts +72 -0
- package/dist/src/component/KgSearch/KgSearch.service.d.ts +32 -0
- package/dist/src/component/KgSearch/KgSearch.store.d.ts +103 -0
- package/dist/src/component/KgSearch/index.d.ts +3 -0
- package/dist/src/component/KgSimulator/KgSimulator.Canvas.Title.d.ts +11 -0
- package/dist/src/component/KgSimulator/KgSimulator.Canvas.d.ts +11 -0
- package/dist/src/component/KgSimulator/KgSimulator.Canvas.service.d.ts +80 -0
- package/dist/src/component/KgSimulator/KgSimulator.Menu.Scene.Create.CircularConveyor.d.ts +36 -0
- package/dist/src/component/KgSimulator/KgSimulator.Menu.Scene.Open.CircularConveyor.d.ts +36 -0
- package/dist/src/component/KgSimulator/KgSimulator.Menu.d.ts +4 -0
- package/dist/src/component/KgSimulator/KgSimulator.Panel.Prefab.d.ts +4 -0
- package/dist/src/component/KgSimulator/KgSimulator.Panel.Property.d.ts +4 -0
- package/dist/src/component/KgSimulator/KgSimulator.Panel.Scene.d.ts +4 -0
- package/dist/src/component/KgSimulator/KgSimulator.Panel.d.ts +97 -0
- package/dist/src/component/KgSimulator/KgSimulator.Prefab.d.ts +108 -0
- package/dist/src/component/KgSimulator/KgSimulator.ToolbarButton.Prefab.d.ts +9 -0
- package/dist/src/component/KgSimulator/KgSimulator.ToolbarButton.Property.d.ts +9 -0
- package/dist/src/component/KgSimulator/KgSimulator.ToolbarButton.Scene.d.ts +9 -0
- package/dist/src/component/KgSimulator/KgSimulator.ToolbarButton.d.ts +113 -0
- package/dist/src/component/KgSimulator/KgSimulator.d.ts +33 -0
- package/dist/src/component/KgSimulator/KgSimulator.event.d.ts +93 -0
- package/dist/src/component/KgSimulator/KgSimulator.hooks.d.ts +103 -0
- package/dist/src/component/KgSimulator/KgSimulator.icons.d.ts +10 -0
- package/dist/src/component/KgSimulator/KgSimulator.model.d.ts +1502 -0
- package/dist/src/component/KgSimulator/KgSimulator.store.d.ts +474 -0
- package/dist/src/component/KgSimulator/KgSimulator.utils.d.ts +21 -0
- package/dist/src/component/KgSimulator/index.d.ts +3 -0
- package/dist/src/component/KgSubmit/KgSubmit.d.ts +21 -0
- package/dist/src/component/KgSubmit/KgSubmit.event.d.ts +135 -0
- package/dist/src/component/KgSubmit/KgSubmit.hooks.d.ts +358 -0
- package/dist/src/component/KgSubmit/KgSubmit.model.d.ts +57 -0
- package/dist/src/component/KgSubmit/KgSubmit.service.d.ts +29 -0
- package/dist/src/component/KgSubmit/KgSubmit.store.d.ts +112 -0
- package/dist/src/component/KgSubmit/index.d.ts +4 -0
- package/dist/src/component/KgTable/KgTable.BodyCell.d.ts +60 -0
- package/dist/src/component/KgTable/KgTable.HeadCell.d.ts +51 -0
- package/dist/src/component/KgTable/KgTable.Info.d.ts +57 -0
- package/dist/src/component/KgTable/KgTable.Setting.VarGridMaster.SaveAs.d.ts +4 -0
- package/dist/src/component/KgTable/KgTable.Setting.d.ts +20 -0
- package/dist/src/component/KgTable/KgTable.Setting.service.d.ts +22 -0
- package/dist/src/component/KgTable/KgTable.d.ts +39 -0
- package/dist/src/component/KgTable/KgTable.event.d.ts +111 -0
- package/dist/src/component/KgTable/KgTable.hooks.d.ts +135 -0
- package/dist/src/component/KgTable/KgTable.model.d.ts +65 -0
- package/dist/src/component/KgTable/KgTable.service.d.ts +34 -0
- package/dist/src/component/KgTable/KgTable.store.d.ts +91 -0
- package/dist/src/component/KgTable/index.d.ts +4 -0
- package/dist/src/component/KgTable02/KgTable02.BodyCell.d.ts +72 -0
- package/dist/src/component/KgTable02/KgTable02.d.ts +46 -0
- package/dist/src/component/KgTable02/KgTable02.event.d.ts +123 -0
- package/dist/src/component/KgTable02/KgTable02.hooks.d.ts +62 -0
- package/dist/src/component/KgTable02/KgTable02.store.d.ts +62 -0
- package/dist/src/component/KgTable02/index.d.ts +4 -0
- package/dist/src/component/KgVar/KgVar.Factory.d.ts +106 -0
- package/dist/src/component/KgVar/KgVar.d.ts +120 -0
- package/dist/src/component/KgVar/KgVar.event.d.ts +75 -0
- package/dist/src/component/KgVar/KgVar.hooks.d.ts +307 -0
- package/dist/src/component/KgVar/KgVar.model.d.ts +70 -0
- package/dist/src/component/KgVar/KgVar.store.d.ts +269 -0
- package/dist/src/component/KgVar/index.d.ts +5 -0
- package/dist/src/component/KgVarConfig/KgVarConfig.d.ts +3 -0
- package/dist/src/component/KgVarConfig/KgVarConfig.hooks.d.ts +3 -0
- package/dist/src/component/KgVarConfig/KgVarConfig.model.d.ts +42 -0
- package/dist/src/component/KgVarConfig/KgVarConfig.store.d.ts +16 -0
- package/dist/src/component/KgVarConfig/components/KgVarConfig.SelectFormIdModal.d.ts +27 -0
- package/dist/src/component/KgVarConfig/components/KgVarConfigModal.d.ts +53 -0
- package/dist/src/component/KgVarConfig/components/button/KgVarConfig.Modal.Button.VarButton.d.ts +7 -0
- package/dist/src/component/KgVarConfig/components/button/KgVarConfig.Modal.Button.VarButtonConfig.d.ts +7 -0
- package/dist/src/component/KgVarConfig/components/button/KgVarConfig.Modal.Button.d.ts +5 -0
- package/dist/src/component/KgVarConfig/components/child/KgVarConfig.Modal.Child.d.ts +7 -0
- package/dist/src/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.VarProfileConfig.d.ts +7 -0
- package/dist/src/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.VarProfileMaster.d.ts +7 -0
- package/dist/src/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.VarProfileMaster.service.d.ts +17 -0
- package/dist/src/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.d.ts +5 -0
- package/dist/src/component/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.VarSubmitConfig.d.ts +7 -0
- package/dist/src/component/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.VarSubmitDetail.d.ts +7 -0
- package/dist/src/component/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.d.ts +5 -0
- package/dist/src/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.VarGridConfig.d.ts +7 -0
- package/dist/src/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.VarGridMaster.d.ts +7 -0
- package/dist/src/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.VarGridMaster.service.d.ts +23 -0
- package/dist/src/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.d.ts +5 -0
- package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigControl.d.ts +2 -0
- package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigDescription.d.ts +2 -0
- package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigInput.d.ts +2 -0
- package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigLookup.d.ts +2 -0
- package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigPossibility.d.ts +2 -0
- package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigTip.d.ts +2 -0
- package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarVariable.d.ts +2 -0
- package/dist/src/component/KgVarConfig/index.d.ts +3 -0
- package/dist/src/component/KgWarehouse/KgWarehouse.d.ts +50 -0
- package/dist/src/component/KgWarehouse/KgWarehouse.event.d.ts +30 -0
- package/dist/src/component/KgWarehouse/KgWarehouse.guard.d.ts +8 -0
- package/dist/src/component/KgWarehouse/KgWarehouse.hooks.d.ts +41 -0
- package/dist/src/component/KgWarehouse/KgWarehouse.store.d.ts +27 -0
- package/dist/src/component/KgWarehouse/index.d.ts +4 -0
- package/dist/src/component/KgWorkStation/KgWorkStation.d.ts +44 -0
- package/dist/src/component/KgWorkStation/KgWorkStation.event.d.ts +27 -0
- package/dist/src/component/KgWorkStation/KgWorkStation.hooks.d.ts +28 -0
- package/dist/src/component/KgWorkStation/KgWorkStation.store.d.ts +37 -0
- package/dist/src/component/KgYesOrNo/KgYesOrNo.d.ts +60 -0
- package/dist/src/component/index.d.ts +22 -0
- package/dist/src/config/config.hooks.d.ts +10 -0
- package/dist/src/config/config.store.d.ts +304 -0
- package/dist/src/config/index.d.ts +63 -0
- package/dist/src/i18n/cs_CZ.d.ts +2 -0
- package/dist/src/i18n/en.d.ts +237 -0
- package/dist/src/i18n/es_ES.d.ts +2 -0
- package/dist/src/i18n/fr_FR.d.ts +2 -0
- package/dist/src/i18n/i18n.setup.d.ts +20 -0
- package/dist/src/i18n/index.d.ts +2 -0
- package/dist/src/i18n/km_KH.d.ts +2 -0
- package/dist/src/i18n/ko_KR.d.ts +2 -0
- package/dist/src/i18n/vi_VN.d.ts +2 -0
- package/dist/src/i18n/zh_CN.d.ts +238 -0
- package/dist/src/index.d.ts +12 -0
- package/dist/src/model/index.d.ts +1976 -0
- package/dist/src/page/KgPageCircularShuttleMonitor/KgPageCircularShuttleMonitor.d.ts +11 -0
- package/dist/src/page/KgPageDda/KgPageDda.d.ts +10 -0
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.Basic.SqlModal.d.ts +32 -0
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.Basic.d.ts +6 -0
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.Button.d.ts +6 -0
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.Menu.d.ts +6 -0
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.Search.d.ts +6 -0
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.Submit.d.ts +6 -0
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.Table.d.ts +6 -0
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.d.ts +32 -0
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.store.d.ts +39 -0
- package/dist/src/page/KgPageDda/index.d.ts +5 -0
- package/dist/src/page/KgPageSqlClient/KgPageSqlClient.d.ts +12 -0
- package/dist/src/page/KgPageSqlClient/components/KgSqlClient.Editor.d.ts +13 -0
- package/dist/src/page/KgPageSqlClient/components/KgSqlClient.ResultTab.d.ts +36 -0
- package/dist/src/page/KgPageSqlClient/components/KgSqlClient.Toolbar.Top.d.ts +7 -0
- package/dist/src/page/KgPageSqlClient/components/KgSqlClient.d.ts +5 -0
- package/dist/src/page/index.d.ts +8 -0
- package/dist/src/project/build/getConfigFileName.d.ts +5 -0
- package/dist/src/project/build/index.d.ts +1 -0
- package/dist/src/project/index.d.ts +3 -0
- package/dist/src/project/src/api/sys/menu.d.ts +4 -0
- package/dist/src/project/src/api/sys/model/menuModel.d.ts +15 -0
- package/dist/src/project/src/api/sys/model/userModel.d.ts +46 -0
- package/dist/src/project/src/components/Application/src/useAppContext.d.ts +9 -0
- package/dist/src/project/src/components/index.d.ts +2 -0
- package/dist/src/project/src/enums/CompTypeEnum.d.ts +19 -0
- package/dist/src/project/src/enums/DateTypeEnum.d.ts +8 -0
- package/dist/src/project/src/enums/appEnum.d.ts +40 -0
- package/dist/src/project/src/enums/breakpointEnum.d.ts +18 -0
- package/dist/src/project/src/enums/cacheEnum.d.ts +18 -0
- package/dist/src/project/src/enums/exceptionEnum.d.ts +17 -0
- package/dist/src/project/src/enums/httpEnum.d.ts +38 -0
- package/dist/src/project/src/enums/jeecgEnum.d.ts +16 -0
- package/dist/src/project/src/enums/menuEnum.d.ts +35 -0
- package/dist/src/project/src/enums/pageEnum.d.ts +14 -0
- package/dist/src/project/src/enums/roleEnum.d.ts +4 -0
- package/dist/src/project/src/enums/sizeEnum.d.ts +18 -0
- package/dist/src/project/src/hooks/component/useFormItem.d.ts +2 -0
- package/dist/src/project/src/hooks/component/usePageContext.d.ts +10 -0
- package/dist/src/project/src/hooks/core/onMountedOrActivated.d.ts +1 -0
- package/dist/src/project/src/hooks/core/useAttrs.d.ts +9 -0
- package/dist/src/project/src/hooks/core/useContext.d.ts +11 -0
- package/dist/src/project/src/hooks/core/useRefs.d.ts +2 -0
- package/dist/src/project/src/hooks/core/useTimeout.d.ts +10 -0
- package/dist/src/project/src/hooks/event/useBreakpoint.d.ts +22 -0
- package/dist/src/project/src/hooks/event/useEventListener.d.ts +14 -0
- package/dist/src/project/src/hooks/event/useIntersectionObserver.d.ts +13 -0
- package/dist/src/project/src/hooks/event/useScrollTo.d.ts +10 -0
- package/dist/src/project/src/hooks/event/useWindowSizeFn.d.ts +7 -0
- package/dist/src/project/src/hooks/index.d.ts +21 -0
- package/dist/src/project/src/hooks/jeecg/useAdaptiveWidth.d.ts +18 -0
- package/dist/src/project/src/hooks/setting/index.d.ts +2 -0
- package/dist/src/project/src/hooks/web/useAppInject.d.ts +3 -0
- package/dist/src/project/src/hooks/web/useContentHeight.d.ts +24 -0
- package/dist/src/project/src/hooks/web/useCopyToClipboard.d.ts +10 -0
- package/dist/src/project/src/hooks/web/useDesign.d.ts +4 -0
- package/dist/src/project/src/hooks/web/usePage.d.ts +10 -0
- package/dist/src/project/src/hooks/web/usePagination.d.ts +7 -0
- package/dist/src/project/src/hooks/web/useWebSocket.d.ts +18 -0
- package/dist/src/project/src/layouts/default/content/useContentContext.d.ts +9 -0
- package/dist/src/project/src/layouts/default/content/useContentViewHeight.d.ts +7 -0
- package/dist/src/project/src/locales/helper.d.ts +4 -0
- package/dist/src/project/src/locales/setupI18n.d.ts +4 -0
- package/dist/src/project/src/locales/useLocale.d.ts +11 -0
- package/dist/src/project/src/router/constant2.d.ts +3 -0
- package/dist/src/project/src/router/types.d.ts +61 -0
- package/dist/src/project/src/settings/componentSetting.d.ts +44 -0
- package/dist/src/project/src/settings/designSetting.d.ts +6 -0
- package/dist/src/project/src/settings/encryptionSetting.d.ts +6 -0
- package/dist/src/project/src/settings/projectSetting.d.ts +3 -0
- package/dist/src/project/src/store/modules/locale.d.ts +38 -0
- package/dist/src/project/src/utils/auth/index.d.ts +19 -0
- package/dist/src/project/src/utils/bem.d.ts +15 -0
- package/dist/src/project/src/utils/cache/index.d.ts +7 -0
- package/dist/src/project/src/utils/cache/memory.d.ts +22 -0
- package/dist/src/project/src/utils/cache/persistent.d.ts +33 -0
- package/dist/src/project/src/utils/cache/storageCache.d.ts +8 -0
- package/dist/src/project/src/utils/cipher.d.ts +19 -0
- package/dist/src/project/src/utils/color.d.ts +29 -0
- package/dist/src/project/src/utils/common/compUtils.d.ts +87 -0
- package/dist/src/project/src/utils/common/functionUtils.d.ts +6 -0
- package/dist/src/project/src/utils/dateUtil.d.ts +4 -0
- package/dist/src/project/src/utils/domUtils.d.ts +28 -0
- package/dist/src/project/src/utils/encryption/signMd5Utils.d.ts +29 -0
- package/dist/src/project/src/utils/env.d.ts +16 -0
- package/dist/src/project/src/utils/event/index.d.ts +3 -0
- package/dist/src/project/src/utils/factory/createAsyncComponent.d.ts +9 -0
- package/dist/src/project/src/utils/file/base64Conver.d.ts +4 -0
- package/dist/src/project/src/utils/file/download.d.ts +9 -0
- package/dist/src/project/src/utils/helper/treeHelper.d.ts +34 -0
- package/dist/src/project/src/utils/helper/tsxHelper.d.ts +13 -0
- package/dist/src/project/src/utils/index.index.d.ts +42 -0
- package/dist/src/project/src/utils/is.d.ts +17 -0
- package/dist/src/project/src/utils/mitt.d.ts +26 -0
- package/dist/src/project/src/utils/propTypes.d.ts +9 -0
- package/dist/src/project/src/utils/props.d.ts +68 -0
- package/dist/src/project/src/utils/uuid.d.ts +2 -0
- package/dist/src/project/types/axios.d.ts +35 -0
- package/dist/src/project/types/config.d.ts +108 -0
- package/dist/src/project/types/store.d.ts +43 -0
- package/dist/src/project/types/utils.d.ts +4 -0
- package/dist/src/service/http-client.d.ts +98 -0
- package/dist/src/util/ant-design-vue.d.ts +347 -0
- package/dist/src/util/event.util.d.ts +15 -0
- package/dist/src/util/kg-auth.util.d.ts +12 -0
- package/dist/src/util/kg-route.util.d.ts +18 -0
- package/dist/src/util/kg.util.d.ts +347 -0
- package/dist/src/util/tsx.helper.d.ts +23 -0
- package/dist/stop-outlined.9f2c4f61.mjs +8 -0
- package/dist/stop.ea3dde55.mjs +8 -0
- package/dist/three-dots-loading-bIlrTJYR.ebceb73e.mjs +8 -0
- package/dist/upload-outlined.c576b26a.mjs +8 -0
- package/package.json +68 -10
- package/api/WMS/Controllers/DescriptionController/List.ts +0 -84
- package/api/WMS/Controllers/DescriptionController/ListByCodeNamesAndCodeValues.ts +0 -21
- package/api/WMS/Controllers/DescriptionController/index.ts +0 -2
- package/api/WMS/Controllers/SqlClientController/Execute.ts +0 -21
- package/api/WMS/Controllers/SqlClientController/ExecutePage.ts +0 -21
- package/api/WMS/Controllers/SqlClientController/index.ts +0 -2
- package/api/WMS/Controllers/SysPermissionController/List.ts +0 -117
- package/api/WMS/Controllers/SysPermissionController/index.ts +0 -1
- package/api/WMS/Controllers/VarConfigDescriptionController/Add.ts +0 -21
- package/api/WMS/Controllers/VarConfigDescriptionController/ListByFormId.ts +0 -21
- package/api/WMS/Controllers/VarConfigPossibilityController/ExecuteQuery.ts +0 -36
- package/api/WMS/Controllers/VarConfigPossibilityController/index.ts +0 -1
- package/api/WMS/Controllers/VarController/GetAll.ts +0 -21
- package/api/WMS/Controllers/VarController/index.ts +0 -1
- package/api/WMS/Controllers/VarDdaController/Create.ts +0 -21
- package/api/WMS/Controllers/VarDdaController/GetResultSetMetadataFromSql.ts +0 -21
- package/api/WMS/Controllers/VarDdaController/ValidateCopySql.ts +0 -21
- package/api/WMS/Controllers/VarDdaController/ValidateCreateSql.ts +0 -21
- package/api/WMS/Controllers/VarDdaController/ValidateDeleteSql.ts +0 -21
- package/api/WMS/Controllers/VarDdaController/ValidateFrmId.ts +0 -21
- package/api/WMS/Controllers/VarDdaController/ValidateSearchSql.ts +0 -21
- package/api/WMS/Controllers/VarDdaController/ValidateUpdateSql.ts +0 -21
- package/api/WMS/Controllers/VarDdaController/ValidateVarButtonVarName.ts +0 -21
- package/api/WMS/Controllers/VarDdaController/index.ts +0 -9
- package/api/WMS/Controllers/VarGridMasterController/QueryByID.ts +0 -36
- package/api/WMS/Controllers/VarGridMasterController/Update.ts +0 -21
- package/api/WMS/Controllers/VarGridMasterController/index.ts +0 -2
- package/api/WMS/Controllers/VarProfileMasterController/QueryByID.ts +0 -36
- package/api/WMS/Controllers/VarProfileMasterController/index.ts +0 -1
- package/api/WMS/Controllers/VarVariableController/Delete.ts +0 -21
- package/api/WMS/Controllers/VarVariableController/index.ts +0 -1
- package/api/WMS/Controllers/WarehouseController/ListVO.ts +0 -45
- package/api/WMS/Controllers/WorkstationController/List.ts +0 -45
- package/api/WMS/Controllers/WorkstationController/index.ts +0 -1
- package/api/WMS/index.ts +0 -2
- package/api/WMS/models.ts +0 -2113
- package/api/api.ts +0 -1
- package/api/def.ts +0 -1
- package/api/index.ts +0 -2
- package/asset/ant.less +0 -678
- package/asset/element-plus.css +0 -112
- package/asset/flag/cs_CZ.png +0 -0
- package/asset/flag/en.png +0 -0
- package/asset/flag/es_ES.png +0 -0
- package/asset/flag/fr_FR.png +0 -0
- package/asset/flag/km_KH.png +0 -0
- package/asset/flag/ko_KR.png +0 -0
- package/asset/flag/vi_VN.png +0 -0
- package/asset/flag/zh_CN.png +0 -0
- package/asset/images/warehouse.000000.svg +0 -9
- package/asset/images/warehouse.1890ff.svg +0 -9
- package/asset/index.less +0 -347
- package/asset/jeecg.less +0 -382
- package/asset/var.less +0 -3
- package/asset/vxe.less +0 -51
- package/component/KgAppSelect/KgAppSelect.event.ts +0 -52
- package/component/KgAppSelect/KgAppSelect.hooks.ts +0 -50
- package/component/KgAppSelect/KgAppSelect.less +0 -30
- package/component/KgAppSelect/KgAppSelect.store.ts +0 -162
- package/component/KgAppSelect/KgAppSelect.tsx +0 -60
- package/component/KgAppSelect/index.ts +0 -4
- package/component/KgButton/KgButton.Copy.tsx +0 -143
- package/component/KgButton/KgButton.Create.tsx +0 -208
- package/component/KgButton/KgButton.Delete.tsx +0 -156
- package/component/KgButton/KgButton.Export.tsx +0 -294
- package/component/KgButton/KgButton.Import.tsx +0 -247
- package/component/KgButton/KgButton.ImportTemplate.tsx +0 -214
- package/component/KgButton/KgButton.Item.tsx +0 -128
- package/component/KgButton/KgButton.Other.tsx +0 -292
- package/component/KgButton/KgButton.Search.tsx +0 -146
- package/component/KgButton/KgButton.Update.tsx +0 -210
- package/component/KgButton/KgButton.event.ts +0 -157
- package/component/KgButton/KgButton.hooks.ts +0 -117
- package/component/KgButton/KgButton.less +0 -187
- package/component/KgButton/KgButton.model.tsx +0 -39
- package/component/KgButton/KgButton.store.ts +0 -333
- package/component/KgButton/KgButton.tsx +0 -221
- package/component/KgCanvas/KgCanvas.ContextMenu.tsx +0 -181
- package/component/KgCanvas/KgCanvas.ToolbarButton.Fullscreen.tsx +0 -80
- package/component/KgCanvas/KgCanvas.ToolbarButton.Mode.tsx +0 -68
- package/component/KgCanvas/KgCanvas.ToolbarButton.OverviewScale.tsx +0 -66
- package/component/KgCanvas/KgCanvas.Tooltip.tsx +0 -118
- package/component/KgCanvas/KgCanvas.css +0 -128
- package/component/KgCanvas/KgCanvas.event.ts +0 -380
- package/component/KgCanvas/KgCanvas.hooks.ts +0 -181
- package/component/KgCanvas/KgCanvas.model.ts +0 -31
- package/component/KgCanvas/KgCanvas.service.tsx +0 -116
- package/component/KgCanvas/KgCanvas.store.ts +0 -68
- package/component/KgCanvas/KgCanvas.tsx +0 -632
- package/component/KgCanvas/index.ts +0 -5
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.AreaSelect.tsx +0 -107
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Canvas.service.tsx +0 -3053
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Canvas.tsx +0 -606
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Legend.tsx +0 -71
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Offline.tsx +0 -50
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Setting.tsx +0 -169
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Tab.Log.tsx +0 -30
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Tab.Rgv.tsx +0 -672
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.css +0 -510
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.hooks.ts +0 -78
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.model.ts +0 -161
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.store.tsx +0 -744
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.tsx +0 -171
- package/component/KgCircularShuttleMonitor/index.ts +0 -4
- package/component/KgForm/KgForm.event.ts +0 -328
- package/component/KgForm/KgForm.hooks.ts +0 -158
- package/component/KgForm/KgForm.less +0 -0
- package/component/KgForm/KgForm.store.ts +0 -36
- package/component/KgForm/KgForm.tsx +0 -61
- package/component/KgForm/index.ts +0 -10
- package/component/KgForm.Item/KgForm.Item.Addon.DynamicQueryOperator.tsx +0 -88
- package/component/KgForm.Item/KgForm.Item.Addon.Lookup.Modal.tsx +0 -191
- package/component/KgForm.Item/KgForm.Item.Addon.Lookup.tsx +0 -76
- package/component/KgForm.Item/KgForm.Item.Checkbox.tsx +0 -61
- package/component/KgForm.Item/KgForm.Item.CheckboxGroup.tsx +0 -176
- package/component/KgForm.Item/KgForm.Item.Date.tsx +0 -88
- package/component/KgForm.Item/KgForm.Item.DateRange.tsx +0 -110
- package/component/KgForm.Item/KgForm.Item.Image.tsx +0 -35
- package/component/KgForm.Item/KgForm.Item.Input.tsx +0 -72
- package/component/KgForm.Item/KgForm.Item.InputNumber.tsx +0 -68
- package/component/KgForm.Item/KgForm.Item.InputPassword.tsx +0 -72
- package/component/KgForm.Item/KgForm.Item.Link.tsx +0 -37
- package/component/KgForm.Item/KgForm.Item.RadioGroup.tsx +0 -91
- package/component/KgForm.Item/KgForm.Item.Select.service.tsx +0 -317
- package/component/KgForm.Item/KgForm.Item.Select.tsx +0 -236
- package/component/KgForm.Item/KgForm.Item.Switch.tsx +0 -49
- package/component/KgForm.Item/KgForm.Item.TextArea.tsx +0 -99
- package/component/KgForm.Item/KgForm.Item.less +0 -476
- package/component/KgForm.Item/KgForm.Item.model.ts +0 -129
- package/component/KgForm.Item/KgForm.Item.service.tsx +0 -479
- package/component/KgForm.Item/KgForm.Item.tsx +0 -642
- package/component/KgImage/KgImage.less +0 -12
- package/component/KgImage/KgImage.tsx +0 -73
- package/component/KgLayoutHeader/KgLayoutHeader.Locale.tsx +0 -118
- package/component/KgLayoutHeader/KgLayoutHeader.hooks.ts +0 -31
- package/component/KgLayoutHeader/KgLayoutHeader.less +0 -14
- package/component/KgLayoutHeader/index.ts +0 -3
- package/component/KgModal/KgModal.css +0 -234
- package/component/KgModal/KgModal.model.ts +0 -9
- package/component/KgModal/KgModal.service.ts +0 -560
- package/component/KgModal/KgModal.tsx +0 -207
- package/component/KgModal/KgModalHeaderButtons.tsx +0 -130
- package/component/KgModal02/KgModal02.css +0 -11
- package/component/KgModal02/KgModal02.model.ts +0 -1
- package/component/KgModal02/KgModal02.tsx +0 -93
- package/component/KgProgressA/KgProgressA.less +0 -35
- package/component/KgProgressA/KgProgressA.tsx +0 -90
- package/component/KgResizable/KgResizable.less +0 -114
- package/component/KgResizable/KgResizable.service.tsx +0 -41
- package/component/KgResizable/KgResizable.tsx +0 -239
- package/component/KgSearch/KgSearch.event.ts +0 -78
- package/component/KgSearch/KgSearch.hooks.ts +0 -160
- package/component/KgSearch/KgSearch.less +0 -251
- package/component/KgSearch/KgSearch.service.tsx +0 -236
- package/component/KgSearch/KgSearch.store.ts +0 -609
- package/component/KgSearch/KgSearch.tsx +0 -506
- package/component/KgSearch/index.ts +0 -4
- package/component/KgSimulator/KgSimulator.Canvas.Title.tsx +0 -71
- package/component/KgSimulator/KgSimulator.Canvas.service.tsx +0 -3403
- package/component/KgSimulator/KgSimulator.Canvas.tsx +0 -1105
- package/component/KgSimulator/KgSimulator.Menu.Scene.Create.CircularConveyor.tsx +0 -258
- package/component/KgSimulator/KgSimulator.Menu.Scene.Open.CircularConveyor.tsx +0 -214
- package/component/KgSimulator/KgSimulator.Menu.tsx +0 -446
- package/component/KgSimulator/KgSimulator.Panel.Prefab.tsx +0 -87
- package/component/KgSimulator/KgSimulator.Panel.Property.tsx +0 -1120
- package/component/KgSimulator/KgSimulator.Panel.Scene.tsx +0 -819
- package/component/KgSimulator/KgSimulator.Panel.tsx +0 -149
- package/component/KgSimulator/KgSimulator.Prefab.tsx +0 -142
- package/component/KgSimulator/KgSimulator.ToolbarButton.Prefab.tsx +0 -44
- package/component/KgSimulator/KgSimulator.ToolbarButton.Property.tsx +0 -40
- package/component/KgSimulator/KgSimulator.ToolbarButton.Scene.tsx +0 -40
- package/component/KgSimulator/KgSimulator.ToolbarButton.tsx +0 -130
- package/component/KgSimulator/KgSimulator.css +0 -610
- package/component/KgSimulator/KgSimulator.event.ts +0 -197
- package/component/KgSimulator/KgSimulator.hooks.ts +0 -237
- package/component/KgSimulator/KgSimulator.icons.tsx +0 -148
- package/component/KgSimulator/KgSimulator.model.ts +0 -2629
- package/component/KgSimulator/KgSimulator.store.tsx +0 -1192
- package/component/KgSimulator/KgSimulator.tsx +0 -235
- package/component/KgSimulator/KgSimulator.utils.ts +0 -30
- package/component/KgSimulator/index.ts +0 -4
- package/component/KgSubmit/KgSubmit.event.ts +0 -272
- package/component/KgSubmit/KgSubmit.hooks.ts +0 -662
- package/component/KgSubmit/KgSubmit.less +0 -174
- package/component/KgSubmit/KgSubmit.model.ts +0 -82
- package/component/KgSubmit/KgSubmit.service.tsx +0 -368
- package/component/KgSubmit/KgSubmit.store.ts +0 -568
- package/component/KgSubmit/KgSubmit.tsx +0 -1132
- package/component/KgSubmit/index.ts +0 -5
- package/component/KgTable/KgTable.BodyCell.tsx +0 -475
- package/component/KgTable/KgTable.HeadCell.tsx +0 -333
- package/component/KgTable/KgTable.Info.tsx +0 -133
- package/component/KgTable/KgTable.Setting.VarGridMaster.SaveAs.tsx +0 -63
- package/component/KgTable/KgTable.Setting.service.tsx +0 -285
- package/component/KgTable/KgTable.Setting.tsx +0 -377
- package/component/KgTable/KgTable.event.ts +0 -206
- package/component/KgTable/KgTable.hooks.ts +0 -235
- package/component/KgTable/KgTable.less +0 -912
- package/component/KgTable/KgTable.model.ts +0 -73
- package/component/KgTable/KgTable.service.tsx +0 -781
- package/component/KgTable/KgTable.store.ts +0 -390
- package/component/KgTable/KgTable.tsx +0 -1105
- package/component/KgTable/index.ts +0 -5
- package/component/KgTable02/KgTable02.BodyCell.tsx +0 -407
- package/component/KgTable02/KgTable02.css +0 -199
- package/component/KgTable02/KgTable02.event.ts +0 -224
- package/component/KgTable02/KgTable02.hooks.ts +0 -111
- package/component/KgTable02/KgTable02.store.ts +0 -186
- package/component/KgTable02/KgTable02.tsx +0 -865
- package/component/KgTable02/index.ts +0 -5
- package/component/KgVar/KgVar.Factory.tsx +0 -146
- package/component/KgVar/KgVar.css +0 -125
- package/component/KgVar/KgVar.event.ts +0 -122
- package/component/KgVar/KgVar.hooks.ts +0 -543
- package/component/KgVar/KgVar.model.ts +0 -86
- package/component/KgVar/KgVar.store.ts +0 -2966
- package/component/KgVar/KgVar.tsx +0 -276
- package/component/KgVar/index.ts +0 -6
- package/component/KgVarConfig/KgVarConfig.hooks.ts +0 -19
- package/component/KgVarConfig/KgVarConfig.less +0 -499
- package/component/KgVarConfig/KgVarConfig.model.ts +0 -56
- package/component/KgVarConfig/KgVarConfig.store.ts +0 -29
- package/component/KgVarConfig/KgVarConfig.tsx +0 -139
- package/component/KgVarConfig/components/KgVarConfig.SelectFormIdModal.tsx +0 -138
- package/component/KgVarConfig/components/KgVarConfigModal.tsx +0 -228
- package/component/KgVarConfig/components/button/KgVarConfig.Modal.Button.VarButton.tsx +0 -647
- package/component/KgVarConfig/components/button/KgVarConfig.Modal.Button.VarButtonConfig.tsx +0 -64
- package/component/KgVarConfig/components/button/KgVarConfig.Modal.Button.tsx +0 -44
- package/component/KgVarConfig/components/child/KgVarConfig.Modal.Child.tsx +0 -265
- package/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.VarProfileConfig.tsx +0 -64
- package/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.VarProfileMaster.service.tsx +0 -408
- package/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.VarProfileMaster.tsx +0 -399
- package/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.tsx +0 -44
- package/component/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.VarSubmitConfig.tsx +0 -336
- package/component/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.VarSubmitDetail.tsx +0 -165
- package/component/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.tsx +0 -44
- package/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.VarGridConfig.tsx +0 -209
- package/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.VarGridMaster.service.tsx +0 -567
- package/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.VarGridMaster.tsx +0 -398
- package/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.tsx +0 -44
- package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigControl.tsx +0 -162
- package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigDescription.tsx +0 -119
- package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigInput.tsx +0 -322
- package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigLookup.tsx +0 -222
- package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigPossibility.tsx +0 -194
- package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigTip.tsx +0 -134
- package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarVariable.tsx +0 -129
- package/component/KgVarConfig/index.ts +0 -6
- package/component/KgWarehouse/KgWarehouse.event.ts +0 -63
- package/component/KgWarehouse/KgWarehouse.guard.ts +0 -77
- package/component/KgWarehouse/KgWarehouse.hooks.ts +0 -92
- package/component/KgWarehouse/KgWarehouse.less +0 -78
- package/component/KgWarehouse/KgWarehouse.store.ts +0 -135
- package/component/KgWarehouse/KgWarehouse.tsx +0 -321
- package/component/KgWarehouse/index.ts +0 -5
- package/component/KgWorkStation/KgWorkStation.css +0 -8
- package/component/KgWorkStation/KgWorkStation.event.ts +0 -54
- package/component/KgWorkStation/KgWorkStation.hooks.ts +0 -59
- package/component/KgWorkStation/KgWorkStation.store.ts +0 -144
- package/component/KgWorkStation/KgWorkStation.tsx +0 -254
- package/component/KgYesOrNo/KgYesOrNo.less +0 -3
- package/component/KgYesOrNo/KgYesOrNo.tsx +0 -50
- package/component/index.ts +0 -23
- package/config/config.hooks.ts +0 -32
- package/config/config.store.ts +0 -705
- package/config/index.ts +0 -347
- package/i18n/cs_CZ.ts +0 -1
- package/i18n/en.ts +0 -236
- package/i18n/es_ES.ts +0 -1
- package/i18n/fr_FR.ts +0 -1
- package/i18n/i18n.setup.ts +0 -61
- package/i18n/index.ts +0 -23
- package/i18n/km_KH.ts +0 -1
- package/i18n/ko_KR.ts +0 -1
- package/i18n/vi_VN.ts +0 -1
- package/i18n/zh_CN.ts +0 -237
- package/index.ts +0 -15
- package/model/index.ts +0 -1695
- package/page/KgPageCircularShuttleMonitor/KgPageCircularShuttleMonitor.tsx +0 -13
- package/page/KgPageDda/KgPageDda.css +0 -0
- package/page/KgPageDda/KgPageDda.tsx +0 -140
- package/page/KgPageDda/components/KgPageDda.Create.Basic.SqlModal.tsx +0 -65
- package/page/KgPageDda/components/KgPageDda.Create.Basic.tsx +0 -219
- package/page/KgPageDda/components/KgPageDda.Create.Button.tsx +0 -427
- package/page/KgPageDda/components/KgPageDda.Create.Menu.tsx +0 -148
- package/page/KgPageDda/components/KgPageDda.Create.Search.tsx +0 -371
- package/page/KgPageDda/components/KgPageDda.Create.Submit.tsx +0 -362
- package/page/KgPageDda/components/KgPageDda.Create.Table.tsx +0 -372
- package/page/KgPageDda/components/KgPageDda.Create.less +0 -362
- package/page/KgPageDda/components/KgPageDda.Create.store.ts +0 -437
- package/page/KgPageDda/components/KgPageDda.Create.tsx +0 -330
- package/page/KgPageDda/index.ts +0 -4
- package/page/KgPageSqlClient/KgPageSqlClient.tsx +0 -14
- package/page/KgPageSqlClient/components/KgSqlClient.Editor.tsx +0 -84
- package/page/KgPageSqlClient/components/KgSqlClient.ResultTab.tsx +0 -145
- package/page/KgPageSqlClient/components/KgSqlClient.Toolbar.Top.tsx +0 -132
- package/page/KgPageSqlClient/components/KgSqlClient.css +0 -171
- package/page/KgPageSqlClient/components/KgSqlClient.tsx +0 -110
- package/page/index.ts +0 -55
- package/project/build/generate/generateModifyVars.ts +0 -40
- package/project/index.ts +0 -2
- package/project/src/api/sys/menu.ts +0 -37
- package/project/src/api/sys/model/menuModel.ts +0 -17
- package/project/src/api/sys/model/userModel.ts +0 -58
- package/project/src/components/Application/src/useAppContext.ts +0 -17
- package/project/src/components/index.ts +0 -3
- package/project/src/enums/CompTypeEnum.ts +0 -32
- package/project/src/enums/DateTypeEnum.ts +0 -8
- package/project/src/enums/appEnum.ts +0 -58
- package/project/src/enums/breakpointEnum.ts +0 -28
- package/project/src/enums/cacheEnum.ts +0 -39
- package/project/src/enums/exceptionEnum.ts +0 -27
- package/project/src/enums/httpEnum.ts +0 -50
- package/project/src/enums/jeecgEnum.ts +0 -23
- package/project/src/enums/menuEnum.ts +0 -50
- package/project/src/enums/pageEnum.ts +0 -19
- package/project/src/enums/roleEnum.ts +0 -7
- package/project/src/enums/sizeEnum.ts +0 -27
- package/project/src/hooks/component/useFormItem.ts +0 -44
- package/project/src/hooks/component/usePageContext.ts +0 -18
- package/project/src/hooks/core/onMountedOrActivated.ts +0 -18
- package/project/src/hooks/core/useAttrs.ts +0 -41
- package/project/src/hooks/core/useContext.ts +0 -30
- package/project/src/hooks/core/useRefs.ts +0 -16
- package/project/src/hooks/core/useTimeout.ts +0 -45
- package/project/src/hooks/event/useBreakpoint.ts +0 -89
- package/project/src/hooks/event/useEventListener.ts +0 -52
- package/project/src/hooks/event/useIntersectionObserver.ts +0 -42
- package/project/src/hooks/event/useScrollTo.ts +0 -59
- package/project/src/hooks/event/useWindowSizeFn.ts +0 -36
- package/project/src/hooks/index.ts +0 -26
- package/project/src/hooks/jeecg/useAdaptiveWidth.ts +0 -82
- package/project/src/hooks/setting/index.ts +0 -27
- package/project/src/hooks/web/useAppInject.ts +0 -10
- package/project/src/hooks/web/useContentHeight.ts +0 -175
- package/project/src/hooks/web/useCopyToClipboard.ts +0 -70
- package/project/src/hooks/web/useDesign.ts +0 -10
- package/project/src/hooks/web/usePage.ts +0 -87
- package/project/src/hooks/web/usePagination.ts +0 -31
- package/project/src/hooks/web/useWebSocket.ts +0 -95
- package/project/src/layouts/default/content/useContentContext.ts +0 -17
- package/project/src/layouts/default/content/useContentViewHeight.ts +0 -42
- package/project/src/locales/helper.ts +0 -36
- package/project/src/locales/setupI18n.ts +0 -43
- package/project/src/locales/useLocale.ts +0 -77
- package/project/src/router/constant2.ts +0 -5
- package/project/src/router/types.ts +0 -73
- package/project/src/settings/componentSetting.ts +0 -88
- package/project/src/settings/designSetting.ts +0 -14
- package/project/src/settings/encryptionSetting.ts +0 -11
- package/project/src/settings/projectSetting.ts +0 -194
- package/project/src/store/modules/locale.ts +0 -49
- package/project/src/utils/auth/index.ts +0 -42
- package/project/src/utils/bem.ts +0 -45
- package/project/src/utils/cache/index.ts +0 -31
- package/project/src/utils/cache/memory.ts +0 -99
- package/project/src/utils/cache/persistent.ts +0 -132
- package/project/src/utils/cache/storageCache.ts +0 -102
- package/project/src/utils/cipher.ts +0 -54
- package/project/src/utils/color.ts +0 -93
- package/project/src/utils/common/compUtils.ts +0 -292
- package/project/src/utils/common/functionUtils.ts +0 -14
- package/project/src/utils/dateUtil.ts +0 -14
- package/project/src/utils/domUtils.ts +0 -158
- package/project/src/utils/encryption/signMd5Utils.ts +0 -122
- package/project/src/utils/env.ts +0 -40
- package/project/src/utils/event/index.ts +0 -39
- package/project/src/utils/factory/createAsyncComponent.tsx +0 -50
- package/project/src/utils/file/base64Conver.ts +0 -15
- package/project/src/utils/file/download.ts +0 -37
- package/project/src/utils/helper/treeHelper.ts +0 -145
- package/project/src/utils/helper/tsxHelper.ts +0 -35
- package/project/src/utils/index.index.ts +0 -158
- package/project/src/utils/is.ts +0 -85
- package/project/src/utils/mitt.ts +0 -101
- package/project/src/utils/propTypes.ts +0 -34
- package/project/src/utils/props.ts +0 -139
- package/project/src/utils/uuid.ts +0 -29
- package/project/types/axios.ts +0 -57
- package/project/types/config.ts +0 -180
- package/project/types/global.d.ts +0 -191
- package/project/types/store.ts +0 -60
- package/project/types/utils.ts +0 -5
- package/service/http-client.ts +0 -257
- package/tsconfig.json +0 -26
- package/type/env.d.ts +0 -7
- package/type/index.d.ts +0 -1
- package/util/ant-design-vue.ts +0 -146
- package/util/event.util.ts +0 -24
- package/util/kg-auth.util.ts +0 -16
- package/util/kg-route.util.ts +0 -25
- package/util/kg.util.tsx +0 -2997
- package/util/tsx.helper.tsx +0 -45
- /package/{project → dist/project}/build/config/themeConfig.ts +0 -0
- /package/{project → dist/project}/build/constant.ts +0 -0
- /package/{project → dist/project}/build/generate/icon/index.ts +0 -0
- /package/{project → dist/project}/build/getConfigFileName.ts +0 -0
- /package/{project → dist/project}/build/index.ts +0 -0
- /package/{project → dist/project}/build/script/buildConf.ts +0 -0
- /package/{project → dist/project}/build/script/postBuild.ts +0 -0
- /package/{project → dist/project}/build/utils.ts +0 -0
- /package/{project → dist/project}/build/vite/plugin/compress.ts +0 -0
- /package/{project → dist/project}/build/vite/plugin/html.ts +0 -0
- /package/{project → dist/project}/build/vite/plugin/imagemin.ts +0 -0
- /package/{project → dist/project}/build/vite/plugin/index.ts +0 -0
- /package/{project → dist/project}/build/vite/plugin/pwa.ts +0 -0
- /package/{project → dist/project}/build/vite/plugin/styleImport.ts +0 -0
- /package/{project → dist/project}/build/vite/plugin/svgSprite.ts +0 -0
- /package/{project → dist/project}/build/vite/plugin/theme.ts +0 -0
- /package/{project → dist/project}/build/vite/plugin/visualizer.ts +0 -0
- /package/{project → dist/project}/build/vite/proxy.ts +0 -0
- /package/{api/WMS/Controllers/VarConfigDescriptionController/index.ts → dist/src/api/WMS/Controllers/VarConfigDescriptionController/index.d.ts} +0 -0
- /package/{api/WMS/Controllers/WarehouseController/index.ts → dist/src/api/WMS/Controllers/WarehouseController/index.d.ts} +0 -0
- /package/{api/WMS/Controllers/index.ts → dist/src/api/WMS/Controllers/index.d.ts} +0 -0
- /package/{component/KgButton/index.ts → dist/src/component/KgButton/index.d.ts} +0 -0
- /package/{component/KgForm.Item/index.ts → dist/src/component/KgForm.Item/index.d.ts} +0 -0
- /package/{component/KgImage/index.ts → dist/src/component/KgImage/index.d.ts} +0 -0
- /package/{component/KgModal/index.ts → dist/src/component/KgModal/index.d.ts} +0 -0
- /package/{component/KgModal02/index.ts → dist/src/component/KgModal02/index.d.ts} +0 -0
- /package/{component/KgProgressA/index.ts → dist/src/component/KgProgressA/index.d.ts} +0 -0
- /package/{component/KgResizable/index.ts → dist/src/component/KgResizable/index.d.ts} +0 -0
- /package/{component/KgSearch/KgSearch.model.ts → dist/src/component/KgSearch/KgSearch.model.d.ts} +0 -0
- /package/{component/KgTable02/KgTable02.model.ts → dist/src/component/KgTable02/KgTable02.model.d.ts} +0 -0
- /package/{component/KgWorkStation/index.ts → dist/src/component/KgWorkStation/index.d.ts} +0 -0
- /package/{component/KgYesOrNo/index.ts → dist/src/component/KgYesOrNo/index.d.ts} +0 -0
- /package/{page/KgPageCircularShuttleMonitor/index.ts → dist/src/page/KgPageCircularShuttleMonitor/index.d.ts} +0 -0
- /package/{page/KgPageSqlClient/index.ts → dist/src/page/KgPageSqlClient/index.d.ts} +0 -0
- /package/{project/src/api/index.ts → dist/src/project/src/api/index.d.ts} +0 -0
- /package/{project/src/api/sys/model/uploadModel.ts → dist/src/project/src/api/sys/model/uploadModel.d.ts} +0 -0
- /package/{project/src/components/Dropdown/index.ts → dist/src/project/src/components/Dropdown/index.d.ts} +0 -0
- /package/{project/src/components/Dropdown/src/typing.ts → dist/src/project/src/components/Dropdown/src/typing.d.ts} +0 -0
- /package/{project/src/enums/index.ts → dist/src/project/src/enums/index.d.ts} +0 -0
- /package/{project/src/index.ts → dist/src/project/src/index.d.ts} +0 -0
- /package/{project/src/layouts/index.ts → dist/src/project/src/layouts/index.d.ts} +0 -0
- /package/{project/src/locales/index.ts → dist/src/project/src/locales/index.d.ts} +0 -0
- /package/{project/src/router/index.ts → dist/src/project/src/router/index.d.ts} +0 -0
- /package/{project/src/settings/index.ts → dist/src/project/src/settings/index.d.ts} +0 -0
- /package/{project/src/store/index.ts → dist/src/project/src/store/index.d.ts} +0 -0
- /package/{project/src/store/modules/index.ts → dist/src/project/src/store/modules/index.d.ts} +0 -0
- /package/{project/src/utils/index.ts → dist/src/project/src/utils/index.d.ts} +0 -0
- /package/{project/types/index.ts → dist/src/project/types/index.d.ts} +0 -0
- /package/{service/index.ts → dist/src/service/index.d.ts} +0 -0
- /package/{util/index.ts → dist/src/util/index.d.ts} +0 -0
|
@@ -1,3403 +0,0 @@
|
|
|
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
|