@kengic/vue 0.30.1-beta.82 → 0.30.1-beta.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/WMS/Controllers/DescriptionController/List.ts +84 -0
- package/api/WMS/Controllers/DescriptionController/ListByCodeNamesAndCodeValues.ts +21 -0
- package/api/WMS/Controllers/DescriptionController/index.ts +2 -0
- package/api/WMS/Controllers/SqlClientController/Execute.ts +21 -0
- package/api/WMS/Controllers/SqlClientController/ExecutePage.ts +21 -0
- package/api/WMS/Controllers/SqlClientController/index.ts +2 -0
- package/api/WMS/Controllers/SysPermissionController/List.ts +117 -0
- package/api/WMS/Controllers/SysPermissionController/index.ts +1 -0
- package/api/WMS/Controllers/VarConfigDescriptionController/Add.ts +21 -0
- package/api/WMS/Controllers/VarConfigDescriptionController/ListByFormId.ts +21 -0
- package/api/WMS/Controllers/VarConfigPossibilityController/ExecuteQuery.ts +36 -0
- package/api/WMS/Controllers/VarConfigPossibilityController/index.ts +1 -0
- package/api/WMS/Controllers/VarController/GetAll.ts +21 -0
- package/api/WMS/Controllers/VarController/index.ts +1 -0
- package/api/WMS/Controllers/VarDdaController/Create.ts +21 -0
- package/api/WMS/Controllers/VarDdaController/GetResultSetMetadataFromSql.ts +21 -0
- package/api/WMS/Controllers/VarDdaController/ValidateCopySql.ts +21 -0
- package/api/WMS/Controllers/VarDdaController/ValidateCreateSql.ts +21 -0
- package/api/WMS/Controllers/VarDdaController/ValidateDeleteSql.ts +21 -0
- package/api/WMS/Controllers/VarDdaController/ValidateFrmId.ts +21 -0
- package/api/WMS/Controllers/VarDdaController/ValidateSearchSql.ts +21 -0
- package/api/WMS/Controllers/VarDdaController/ValidateUpdateSql.ts +21 -0
- package/api/WMS/Controllers/VarDdaController/ValidateVarButtonVarName.ts +21 -0
- package/api/WMS/Controllers/VarDdaController/index.ts +9 -0
- package/api/WMS/Controllers/VarGridMasterController/QueryByID.ts +36 -0
- package/api/WMS/Controllers/VarGridMasterController/Update.ts +21 -0
- package/api/WMS/Controllers/VarGridMasterController/index.ts +2 -0
- package/api/WMS/Controllers/VarProfileMasterController/QueryByID.ts +36 -0
- package/api/WMS/Controllers/VarProfileMasterController/index.ts +1 -0
- package/api/WMS/Controllers/VarVariableController/Delete.ts +21 -0
- package/api/WMS/Controllers/VarVariableController/index.ts +1 -0
- package/api/WMS/Controllers/WarehouseController/ListVO.ts +45 -0
- package/api/WMS/Controllers/WorkstationController/List.ts +45 -0
- package/api/WMS/Controllers/WorkstationController/index.ts +1 -0
- package/api/WMS/index.ts +2 -0
- package/api/WMS/models.ts +2113 -0
- package/api/api.ts +1 -0
- package/api/def.ts +1 -0
- package/api/index.ts +2 -0
- package/asset/ant.less +678 -0
- package/asset/element-plus.css +112 -0
- 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 +9 -0
- package/asset/images/warehouse.1890ff.svg +9 -0
- package/asset/index.less +347 -0
- package/asset/jeecg.less +382 -0
- package/asset/var.less +3 -0
- package/asset/vxe.less +51 -0
- package/bin/bin.mjs +57 -0
- package/bin/postinstall.mjs +69 -0
- package/component/KgAppSelect/KgAppSelect.event.ts +52 -0
- package/component/KgAppSelect/KgAppSelect.hooks.ts +50 -0
- package/component/KgAppSelect/KgAppSelect.less +30 -0
- package/component/KgAppSelect/KgAppSelect.store.ts +162 -0
- package/component/KgAppSelect/KgAppSelect.tsx +60 -0
- package/component/KgAppSelect/index.ts +4 -0
- package/component/KgButton/KgButton.Copy.tsx +143 -0
- package/component/KgButton/KgButton.Create.tsx +208 -0
- package/component/KgButton/KgButton.Delete.tsx +156 -0
- package/component/KgButton/KgButton.Export.tsx +294 -0
- package/component/KgButton/KgButton.Import.tsx +247 -0
- package/component/KgButton/KgButton.ImportTemplate.tsx +214 -0
- package/component/KgButton/KgButton.Item.tsx +128 -0
- package/component/KgButton/KgButton.Other.tsx +292 -0
- package/component/KgButton/KgButton.Search.tsx +146 -0
- package/component/KgButton/KgButton.Update.tsx +210 -0
- package/component/KgButton/KgButton.event.ts +157 -0
- package/component/KgButton/KgButton.hooks.ts +117 -0
- package/component/KgButton/KgButton.less +187 -0
- package/component/KgButton/KgButton.model.tsx +39 -0
- package/component/KgButton/KgButton.store.ts +333 -0
- package/component/KgButton/KgButton.tsx +221 -0
- package/component/KgCanvas/KgCanvas.ContextMenu.tsx +181 -0
- package/component/KgCanvas/KgCanvas.ToolbarButton.Fullscreen.tsx +80 -0
- package/component/KgCanvas/KgCanvas.ToolbarButton.Mode.tsx +68 -0
- package/component/KgCanvas/KgCanvas.ToolbarButton.OverviewScale.tsx +66 -0
- package/component/KgCanvas/KgCanvas.Tooltip.tsx +118 -0
- package/component/KgCanvas/KgCanvas.css +128 -0
- package/component/KgCanvas/KgCanvas.event.ts +380 -0
- package/component/KgCanvas/KgCanvas.hooks.ts +181 -0
- package/component/KgCanvas/KgCanvas.model.ts +31 -0
- package/component/KgCanvas/KgCanvas.service.tsx +116 -0
- package/component/KgCanvas/KgCanvas.store.ts +68 -0
- package/component/KgCanvas/KgCanvas.tsx +632 -0
- package/component/KgCanvas/index.ts +5 -0
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.AreaSelect.tsx +107 -0
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Canvas.service.tsx +3053 -0
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Canvas.tsx +606 -0
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Legend.tsx +71 -0
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Offline.tsx +50 -0
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Setting.tsx +169 -0
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Tab.Log.tsx +30 -0
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Tab.Rgv.tsx +672 -0
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.css +510 -0
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.hooks.ts +78 -0
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.model.ts +161 -0
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.store.tsx +744 -0
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.tsx +171 -0
- package/component/KgCircularShuttleMonitor/index.ts +4 -0
- package/component/KgForm/KgForm.event.ts +328 -0
- package/component/KgForm/KgForm.hooks.ts +158 -0
- package/component/KgForm/KgForm.less +0 -0
- package/component/KgForm/KgForm.store.ts +36 -0
- package/component/KgForm/KgForm.tsx +61 -0
- package/component/KgForm/index.ts +10 -0
- package/component/KgForm.Item/KgForm.Item.Addon.DynamicQueryOperator.tsx +88 -0
- package/component/KgForm.Item/KgForm.Item.Addon.Lookup.Modal.tsx +191 -0
- package/component/KgForm.Item/KgForm.Item.Addon.Lookup.tsx +76 -0
- package/component/KgForm.Item/KgForm.Item.Checkbox.tsx +61 -0
- package/component/KgForm.Item/KgForm.Item.CheckboxGroup.tsx +176 -0
- package/component/KgForm.Item/KgForm.Item.Date.tsx +88 -0
- package/component/KgForm.Item/KgForm.Item.DateRange.tsx +110 -0
- package/component/KgForm.Item/KgForm.Item.Image.tsx +35 -0
- package/component/KgForm.Item/KgForm.Item.Input.tsx +72 -0
- package/component/KgForm.Item/KgForm.Item.InputNumber.tsx +68 -0
- package/component/KgForm.Item/KgForm.Item.InputPassword.tsx +72 -0
- package/component/KgForm.Item/KgForm.Item.Link.tsx +37 -0
- package/component/KgForm.Item/KgForm.Item.RadioGroup.tsx +91 -0
- package/component/KgForm.Item/KgForm.Item.Select.service.tsx +317 -0
- package/component/KgForm.Item/KgForm.Item.Select.tsx +236 -0
- package/component/KgForm.Item/KgForm.Item.Switch.tsx +49 -0
- package/component/KgForm.Item/KgForm.Item.TextArea.tsx +99 -0
- package/component/KgForm.Item/KgForm.Item.less +476 -0
- package/component/KgForm.Item/KgForm.Item.model.ts +129 -0
- package/component/KgForm.Item/KgForm.Item.service.tsx +479 -0
- package/component/KgForm.Item/KgForm.Item.tsx +642 -0
- package/component/KgImage/KgImage.less +12 -0
- package/component/KgImage/KgImage.tsx +73 -0
- package/component/KgLayoutHeader/KgLayoutHeader.Locale.tsx +118 -0
- package/component/KgLayoutHeader/KgLayoutHeader.hooks.ts +31 -0
- package/component/KgLayoutHeader/KgLayoutHeader.less +14 -0
- package/component/KgLayoutHeader/index.ts +3 -0
- package/component/KgModal/KgModal.css +234 -0
- package/component/KgModal/KgModal.model.ts +9 -0
- package/component/KgModal/KgModal.service.ts +560 -0
- package/component/KgModal/KgModal.tsx +207 -0
- package/component/KgModal/KgModalHeaderButtons.tsx +130 -0
- package/component/KgModal02/KgModal02.css +11 -0
- package/component/KgModal02/KgModal02.model.ts +1 -0
- package/component/KgModal02/KgModal02.tsx +93 -0
- package/component/KgProgressA/KgProgressA.less +35 -0
- package/component/KgProgressA/KgProgressA.tsx +90 -0
- package/component/KgResizable/KgResizable.less +114 -0
- package/component/KgResizable/KgResizable.service.tsx +41 -0
- package/component/KgResizable/KgResizable.tsx +239 -0
- package/component/KgSearch/KgSearch.event.ts +78 -0
- package/component/KgSearch/KgSearch.hooks.ts +160 -0
- package/component/KgSearch/KgSearch.less +251 -0
- package/component/KgSearch/KgSearch.service.tsx +236 -0
- package/component/KgSearch/KgSearch.store.ts +609 -0
- package/component/KgSearch/KgSearch.tsx +506 -0
- package/component/KgSearch/index.ts +4 -0
- package/component/KgSimulator/KgSimulator.Canvas.Title.tsx +71 -0
- package/component/KgSimulator/KgSimulator.Canvas.service.tsx +3403 -0
- package/component/KgSimulator/KgSimulator.Canvas.tsx +1105 -0
- package/component/KgSimulator/KgSimulator.Menu.Scene.Create.CircularConveyor.tsx +258 -0
- package/component/KgSimulator/KgSimulator.Menu.Scene.Open.CircularConveyor.tsx +214 -0
- package/component/KgSimulator/KgSimulator.Menu.tsx +446 -0
- package/component/KgSimulator/KgSimulator.Panel.Prefab.tsx +87 -0
- package/component/KgSimulator/KgSimulator.Panel.Property.tsx +1120 -0
- package/component/KgSimulator/KgSimulator.Panel.Scene.tsx +819 -0
- package/component/KgSimulator/KgSimulator.Panel.tsx +149 -0
- package/component/KgSimulator/KgSimulator.Prefab.tsx +142 -0
- package/component/KgSimulator/KgSimulator.ToolbarButton.Prefab.tsx +44 -0
- package/component/KgSimulator/KgSimulator.ToolbarButton.Property.tsx +40 -0
- package/component/KgSimulator/KgSimulator.ToolbarButton.Scene.tsx +40 -0
- package/component/KgSimulator/KgSimulator.ToolbarButton.tsx +130 -0
- package/component/KgSimulator/KgSimulator.css +610 -0
- package/component/KgSimulator/KgSimulator.event.ts +197 -0
- package/component/KgSimulator/KgSimulator.hooks.ts +237 -0
- package/component/KgSimulator/KgSimulator.icons.tsx +148 -0
- package/component/KgSimulator/KgSimulator.model.ts +2629 -0
- package/component/KgSimulator/KgSimulator.store.tsx +1192 -0
- package/component/KgSimulator/KgSimulator.tsx +235 -0
- package/component/KgSimulator/KgSimulator.utils.ts +30 -0
- package/component/KgSimulator/index.ts +4 -0
- package/component/KgSubmit/KgSubmit.event.ts +272 -0
- package/component/KgSubmit/KgSubmit.hooks.ts +662 -0
- package/component/KgSubmit/KgSubmit.less +174 -0
- package/component/KgSubmit/KgSubmit.model.ts +82 -0
- package/component/KgSubmit/KgSubmit.service.tsx +368 -0
- package/component/KgSubmit/KgSubmit.store.ts +568 -0
- package/component/KgSubmit/KgSubmit.tsx +1132 -0
- package/component/KgSubmit/index.ts +5 -0
- package/component/KgTable/KgTable.BodyCell.tsx +475 -0
- package/component/KgTable/KgTable.HeadCell.tsx +333 -0
- package/component/KgTable/KgTable.Info.tsx +133 -0
- package/component/KgTable/KgTable.Setting.VarGridMaster.SaveAs.tsx +63 -0
- package/component/KgTable/KgTable.Setting.service.tsx +285 -0
- package/component/KgTable/KgTable.Setting.tsx +377 -0
- package/component/KgTable/KgTable.event.ts +206 -0
- package/component/KgTable/KgTable.hooks.ts +235 -0
- package/component/KgTable/KgTable.less +912 -0
- package/component/KgTable/KgTable.model.ts +73 -0
- package/component/KgTable/KgTable.service.tsx +781 -0
- package/component/KgTable/KgTable.store.ts +390 -0
- package/component/KgTable/KgTable.tsx +1105 -0
- package/component/KgTable/index.ts +5 -0
- package/component/KgTable02/KgTable02.BodyCell.tsx +407 -0
- package/component/KgTable02/KgTable02.css +199 -0
- package/component/KgTable02/KgTable02.event.ts +224 -0
- package/component/KgTable02/KgTable02.hooks.ts +111 -0
- package/component/KgTable02/KgTable02.store.ts +186 -0
- package/component/KgTable02/KgTable02.tsx +865 -0
- package/component/KgTable02/index.ts +5 -0
- package/component/KgVar/KgVar.Factory.tsx +146 -0
- package/component/KgVar/KgVar.css +125 -0
- package/component/KgVar/KgVar.event.ts +122 -0
- package/component/KgVar/KgVar.hooks.ts +543 -0
- package/component/KgVar/KgVar.model.ts +86 -0
- package/component/KgVar/KgVar.store.ts +2966 -0
- package/component/KgVar/KgVar.tsx +276 -0
- package/component/KgVar/index.ts +6 -0
- package/component/KgVarConfig/KgVarConfig.hooks.ts +19 -0
- package/component/KgVarConfig/KgVarConfig.less +499 -0
- package/component/KgVarConfig/KgVarConfig.model.ts +56 -0
- package/component/KgVarConfig/KgVarConfig.store.ts +29 -0
- package/component/KgVarConfig/KgVarConfig.tsx +139 -0
- package/component/KgVarConfig/components/KgVarConfig.SelectFormIdModal.tsx +138 -0
- package/component/KgVarConfig/components/KgVarConfigModal.tsx +228 -0
- package/component/KgVarConfig/components/button/KgVarConfig.Modal.Button.VarButton.tsx +647 -0
- package/component/KgVarConfig/components/button/KgVarConfig.Modal.Button.VarButtonConfig.tsx +64 -0
- package/component/KgVarConfig/components/button/KgVarConfig.Modal.Button.tsx +44 -0
- package/component/KgVarConfig/components/child/KgVarConfig.Modal.Child.tsx +265 -0
- package/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.VarProfileConfig.tsx +64 -0
- package/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.VarProfileMaster.service.tsx +408 -0
- package/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.VarProfileMaster.tsx +399 -0
- package/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.tsx +44 -0
- package/component/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.VarSubmitConfig.tsx +336 -0
- package/component/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.VarSubmitDetail.tsx +165 -0
- package/component/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.tsx +44 -0
- package/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.VarGridConfig.tsx +209 -0
- package/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.VarGridMaster.service.tsx +567 -0
- package/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.VarGridMaster.tsx +398 -0
- package/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.tsx +44 -0
- package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigControl.tsx +162 -0
- package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigDescription.tsx +119 -0
- package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigInput.tsx +322 -0
- package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigLookup.tsx +222 -0
- package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigPossibility.tsx +194 -0
- package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigTip.tsx +134 -0
- package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarVariable.tsx +129 -0
- package/component/KgVarConfig/index.ts +6 -0
- package/component/KgWarehouse/KgWarehouse.event.ts +63 -0
- package/component/KgWarehouse/KgWarehouse.guard.ts +77 -0
- package/component/KgWarehouse/KgWarehouse.hooks.ts +92 -0
- package/component/KgWarehouse/KgWarehouse.less +78 -0
- package/component/KgWarehouse/KgWarehouse.store.ts +135 -0
- package/component/KgWarehouse/KgWarehouse.tsx +321 -0
- package/component/KgWarehouse/index.ts +5 -0
- package/component/KgWorkStation/KgWorkStation.css +8 -0
- package/component/KgWorkStation/KgWorkStation.event.ts +54 -0
- package/component/KgWorkStation/KgWorkStation.hooks.ts +59 -0
- package/component/KgWorkStation/KgWorkStation.store.ts +144 -0
- package/component/KgWorkStation/KgWorkStation.tsx +254 -0
- package/component/KgWorkStation/index.ts +3 -0
- package/component/KgYesOrNo/KgYesOrNo.less +3 -0
- package/component/KgYesOrNo/KgYesOrNo.tsx +50 -0
- package/component/index.ts +23 -0
- package/config/config.hooks.ts +32 -0
- package/config/config.store.ts +705 -0
- package/config/index.ts +347 -0
- package/i18n/cs_CZ.ts +1 -0
- package/i18n/en.ts +236 -0
- package/i18n/es_ES.ts +1 -0
- package/i18n/fr_FR.ts +1 -0
- package/i18n/i18n.setup.ts +61 -0
- package/i18n/index.ts +23 -0
- package/i18n/km_KH.ts +1 -0
- package/i18n/ko_KR.ts +1 -0
- package/i18n/vi_VN.ts +1 -0
- package/i18n/zh_CN.ts +237 -0
- package/index.ts +15 -0
- package/model/index.ts +1695 -0
- package/package.json +10 -64
- package/page/KgPageCircularShuttleMonitor/KgPageCircularShuttleMonitor.tsx +13 -0
- package/page/KgPageDda/KgPageDda.css +0 -0
- package/page/KgPageDda/KgPageDda.tsx +140 -0
- package/page/KgPageDda/components/KgPageDda.Create.Basic.SqlModal.tsx +65 -0
- package/page/KgPageDda/components/KgPageDda.Create.Basic.tsx +219 -0
- package/page/KgPageDda/components/KgPageDda.Create.Button.tsx +427 -0
- package/page/KgPageDda/components/KgPageDda.Create.Menu.tsx +148 -0
- package/page/KgPageDda/components/KgPageDda.Create.Search.tsx +371 -0
- package/page/KgPageDda/components/KgPageDda.Create.Submit.tsx +362 -0
- package/page/KgPageDda/components/KgPageDda.Create.Table.tsx +372 -0
- package/page/KgPageDda/components/KgPageDda.Create.less +362 -0
- package/page/KgPageDda/components/KgPageDda.Create.store.ts +437 -0
- package/page/KgPageDda/components/KgPageDda.Create.tsx +330 -0
- package/page/KgPageDda/index.ts +4 -0
- package/page/KgPageSqlClient/KgPageSqlClient.tsx +14 -0
- package/page/KgPageSqlClient/components/KgSqlClient.Editor.tsx +84 -0
- package/page/KgPageSqlClient/components/KgSqlClient.ResultTab.tsx +145 -0
- package/page/KgPageSqlClient/components/KgSqlClient.Toolbar.Top.tsx +132 -0
- package/page/KgPageSqlClient/components/KgSqlClient.css +171 -0
- package/page/KgPageSqlClient/components/KgSqlClient.tsx +110 -0
- package/page/index.ts +55 -0
- package/project/build/config/themeConfig.ts +67 -0
- package/project/build/generate/generateModifyVars.ts +40 -0
- package/project/src/api/sys/menu.ts +37 -0
- package/project/src/api/sys/model/menuModel.ts +17 -0
- package/project/src/api/sys/model/userModel.ts +58 -0
- package/project/src/components/Application/src/useAppContext.ts +17 -0
- package/project/src/components/index.ts +3 -0
- package/project/src/enums/CompTypeEnum.ts +32 -0
- package/project/src/enums/DateTypeEnum.ts +8 -0
- package/project/src/enums/appEnum.ts +58 -0
- package/project/src/enums/breakpointEnum.ts +28 -0
- package/project/src/enums/cacheEnum.ts +39 -0
- package/project/src/enums/exceptionEnum.ts +27 -0
- package/project/src/enums/httpEnum.ts +50 -0
- package/project/src/enums/jeecgEnum.ts +23 -0
- package/project/src/enums/menuEnum.ts +50 -0
- package/project/src/enums/pageEnum.ts +19 -0
- package/project/src/enums/roleEnum.ts +7 -0
- package/project/src/enums/sizeEnum.ts +27 -0
- package/project/src/hooks/component/useFormItem.ts +44 -0
- package/project/src/hooks/component/usePageContext.ts +18 -0
- package/project/src/hooks/core/onMountedOrActivated.ts +18 -0
- package/project/src/hooks/core/useAttrs.ts +41 -0
- package/project/src/hooks/core/useContext.ts +30 -0
- package/project/src/hooks/core/useRefs.ts +16 -0
- package/project/src/hooks/core/useTimeout.ts +45 -0
- package/project/src/hooks/event/useBreakpoint.ts +89 -0
- package/project/src/hooks/event/useEventListener.ts +52 -0
- package/project/src/hooks/event/useIntersectionObserver.ts +42 -0
- package/project/src/hooks/event/useScrollTo.ts +59 -0
- package/project/src/hooks/event/useWindowSizeFn.ts +36 -0
- package/project/src/hooks/index.ts +26 -0
- package/project/src/hooks/jeecg/useAdaptiveWidth.ts +82 -0
- package/project/src/hooks/setting/index.ts +27 -0
- package/project/src/hooks/web/useAppInject.ts +10 -0
- package/project/src/hooks/web/useContentHeight.ts +175 -0
- package/project/src/hooks/web/useCopyToClipboard.ts +70 -0
- package/project/src/hooks/web/useDesign.ts +10 -0
- package/project/src/hooks/web/usePage.ts +87 -0
- package/project/src/hooks/web/usePagination.ts +31 -0
- package/project/src/hooks/web/useWebSocket.ts +95 -0
- package/project/src/layouts/default/content/useContentContext.ts +17 -0
- package/project/src/layouts/default/content/useContentViewHeight.ts +42 -0
- package/project/src/locales/helper.ts +36 -0
- package/project/src/locales/setupI18n.ts +43 -0
- package/project/src/locales/useLocale.ts +77 -0
- package/project/src/router/constant2.ts +5 -0
- package/project/src/router/types.ts +73 -0
- package/project/src/settings/componentSetting.ts +88 -0
- package/project/src/settings/designSetting.ts +14 -0
- package/project/src/settings/encryptionSetting.ts +11 -0
- package/project/src/settings/projectSetting.ts +194 -0
- package/project/src/store/modules/locale.ts +49 -0
- package/project/src/utils/auth/index.ts +42 -0
- package/project/src/utils/bem.ts +45 -0
- package/project/src/utils/cache/index.ts +31 -0
- package/project/src/utils/cache/memory.ts +99 -0
- package/project/src/utils/cache/persistent.ts +132 -0
- package/project/src/utils/cache/storageCache.ts +102 -0
- package/project/src/utils/cipher.ts +54 -0
- package/project/src/utils/color.ts +93 -0
- package/project/src/utils/common/compUtils.ts +292 -0
- package/project/src/utils/common/functionUtils.ts +14 -0
- package/project/src/utils/dateUtil.ts +14 -0
- package/project/src/utils/domUtils.ts +158 -0
- package/project/src/utils/encryption/signMd5Utils.ts +122 -0
- package/project/src/utils/env.ts +40 -0
- package/project/src/utils/event/index.ts +39 -0
- package/project/src/utils/factory/createAsyncComponent.tsx +50 -0
- package/project/src/utils/file/base64Conver.ts +15 -0
- package/project/src/utils/file/download.ts +37 -0
- package/project/src/utils/helper/treeHelper.ts +145 -0
- package/project/src/utils/helper/tsxHelper.ts +35 -0
- package/project/src/utils/index.index.ts +158 -0
- package/project/src/utils/is.ts +85 -0
- package/project/src/utils/mitt.ts +101 -0
- package/project/src/utils/propTypes.ts +34 -0
- package/project/src/utils/props.ts +139 -0
- package/project/src/utils/uuid.ts +29 -0
- package/project/types/axios.ts +57 -0
- package/project/types/config.ts +180 -0
- package/project/types/global.d.ts +191 -0
- package/project/types/store.ts +60 -0
- package/project/types/utils.ts +5 -0
- package/service/http-client.ts +257 -0
- package/type/env.d.ts +7 -0
- package/type/index.d.ts +1 -0
- package/util/ant-design-vue.ts +146 -0
- package/util/event.util.ts +24 -0
- package/util/kg-auth.util.ts +16 -0
- package/util/kg-route.util.ts +25 -0
- package/util/kg.util.tsx +2997 -0
- package/util/tsx.helper.tsx +45 -0
- package/CHANGELOG.md +0 -470
- package/README.md +0 -10
- package/dist/aim-outlined.8d38a0f9.mjs +0 -8
- package/dist/align-left-outlined.579b01c6.mjs +0 -8
- package/dist/audit-outlined.4555f723.mjs +0 -8
- package/dist/bubble-loading.cd2fe007.mjs +0 -8
- package/dist/bulb-outlined.a5bf22d8.mjs +0 -8
- package/dist/card-text-outline.6e053122.mjs +0 -8
- package/dist/caret-down-outlined.c0564a3f.mjs +0 -8
- package/dist/caret-left-outlined.35b1d7d1.mjs +0 -8
- package/dist/caret-right-filled.dbbda237.mjs +0 -8
- package/dist/caret-right-outlined-Btgsw6a_.0434903b.mjs +0 -8
- package/dist/caret-right-outlined.12fe6699.mjs +0 -8
- package/dist/caret-up-outlined.81b559ad.mjs +0 -8
- package/dist/check-box-outline-blank.d01a2055.mjs +0 -8
- package/dist/check-circle-outlined.b219949f.mjs +0 -8
- package/dist/check-outlined.59c42074.mjs +0 -8
- package/dist/check-square-outlined.233589d8.mjs +0 -8
- package/dist/checkbox-indeterminate.e5386a53.mjs +0 -8
- package/dist/clock-circle-outline.b9d0b3dc.mjs +0 -8
- package/dist/close-circle-outlined.85f75690.mjs +0 -8
- package/dist/close-outlined-DMcSQWxQ.5c3bee6f.mjs +0 -8
- package/dist/close-outlined.5757472a.mjs +0 -8
- package/dist/collapse-all-rounded.26ee73fc.mjs +0 -8
- package/dist/control-outlined.d66ac4d2.mjs +0 -8
- package/dist/copy-filled.a3dcd299.mjs +0 -8
- package/dist/copy-outlined.6a695d8a.mjs +0 -8
- package/dist/delete-outlined.20afb717.mjs +0 -8
- package/dist/delete-twotone.1d40696a.mjs +0 -8
- package/dist/double-right-outlined.f057a6b2.mjs +0 -8
- package/dist/down-circle-outlined.8ba93393.mjs +0 -8
- package/dist/download-outlined.e78b5364.mjs +0 -8
- package/dist/edit-outlined.0aae2217.mjs +0 -8
- package/dist/edit-twotone.67c952fa.mjs +0 -8
- package/dist/email-resend-outline.780506de.mjs +0 -8
- package/dist/exception-outlined.8c0003a2.mjs +0 -8
- package/dist/exclamation-circle-outlined-DZrXCnvM.d94561db.mjs +0 -8
- package/dist/expand-all-rounded.e01e6cb9.mjs +0 -8
- package/dist/eye-invisible-outlined.5f8d6151.mjs +0 -8
- package/dist/eye-outlined.b25b4d28.mjs +0 -8
- package/dist/file-text-outline.2fbccab6.mjs +0 -8
- package/dist/fit-screen-outline.7341560f.mjs +0 -8
- package/dist/fullscreen-exit-outlined-X1iYkFc4.a1640595.mjs +0 -8
- package/dist/fullscreen-exit-outlined.b77fa876.mjs +0 -8
- package/dist/fullscreen-outlined-DDBrsRcy.b9f9d4a1.mjs +0 -8
- package/dist/fullscreen-outlined.cd572ef8.mjs +0 -8
- package/dist/holder-outlined.9e698750.mjs +0 -8
- package/dist/index.css +0 -1
- package/dist/info-circle-outlined.7ddbd554.mjs +0 -8
- package/dist/kengic-vue.js +0 -224291
- package/dist/key-return-thin.ce6f074c.mjs +0 -8
- package/dist/loading-outlined.13a15197.mjs +0 -8
- package/dist/more-outlined.8e1202ac.mjs +0 -8
- package/dist/one-to-one-outlined.ac265beb.mjs +0 -8
- package/dist/palette-swatch-variant.f7258843.mjs +0 -8
- package/dist/partition-outlined.1bcf4f37.mjs +0 -8
- package/dist/pause-circle-outlined.cd534f5f.mjs +0 -8
- package/dist/pause-outlined.fca0d0f9.mjs +0 -8
- package/dist/pause-rounded.1ed7cc39.mjs +0 -8
- package/dist/play-arrow-rounded.90fc4173.mjs +0 -8
- package/dist/plus-outlined.bdaa6481.mjs +0 -8
- package/dist/printer-outlined.a8d0d92b.mjs +0 -8
- package/dist/profile-outlined.1059fb0d.mjs +0 -8
- package/dist/project/build/config/themeConfig.ts +0 -67
- package/dist/project/build/generate/generateModifyVars.ts +0 -39
- package/dist/project/index.ts +0 -1
- package/dist/project/types/global.d.ts +0 -184
- package/dist/release-gate-check.8c1ba629.mjs +0 -8
- package/dist/reload-outlined.d320578b.mjs +0 -8
- package/dist/retweet-outlined.bfa9b123.mjs +0 -8
- package/dist/save-as-outline-rounded.c65d61b2.mjs +0 -8
- package/dist/save-outline-rounded.c9c3f880.mjs +0 -8
- package/dist/search-outlined-Od1M_oxf.71fb0c01.mjs +0 -8
- package/dist/search-outlined.ba5c5a3f.mjs +0 -8
- package/dist/setting-outlined.a3caf743.mjs +0 -8
- package/dist/src/api/WMS/Controllers/DescriptionController/List.d.ts +0 -51
- package/dist/src/api/WMS/Controllers/DescriptionController/ListByCodeNamesAndCodeValues.d.ts +0 -16
- package/dist/src/api/WMS/Controllers/DescriptionController/index.d.ts +0 -2
- package/dist/src/api/WMS/Controllers/SqlClientController/Execute.d.ts +0 -16
- package/dist/src/api/WMS/Controllers/SqlClientController/ExecutePage.d.ts +0 -16
- package/dist/src/api/WMS/Controllers/SqlClientController/index.d.ts +0 -2
- package/dist/src/api/WMS/Controllers/SysPermissionController/List.d.ts +0 -73
- package/dist/src/api/WMS/Controllers/SysPermissionController/index.d.ts +0 -1
- package/dist/src/api/WMS/Controllers/VarConfigDescriptionController/Add.d.ts +0 -16
- package/dist/src/api/WMS/Controllers/VarConfigDescriptionController/ListByFormId.d.ts +0 -16
- package/dist/src/api/WMS/Controllers/VarConfigPossibilityController/ExecuteQuery.d.ts +0 -18
- package/dist/src/api/WMS/Controllers/VarConfigPossibilityController/index.d.ts +0 -1
- package/dist/src/api/WMS/Controllers/VarController/GetAll.d.ts +0 -16
- package/dist/src/api/WMS/Controllers/VarController/index.d.ts +0 -1
- package/dist/src/api/WMS/Controllers/VarDdaController/Create.d.ts +0 -16
- package/dist/src/api/WMS/Controllers/VarDdaController/GetResultSetMetadataFromSql.d.ts +0 -16
- package/dist/src/api/WMS/Controllers/VarDdaController/ValidateCopySql.d.ts +0 -16
- package/dist/src/api/WMS/Controllers/VarDdaController/ValidateCreateSql.d.ts +0 -16
- package/dist/src/api/WMS/Controllers/VarDdaController/ValidateDeleteSql.d.ts +0 -16
- package/dist/src/api/WMS/Controllers/VarDdaController/ValidateFrmId.d.ts +0 -16
- package/dist/src/api/WMS/Controllers/VarDdaController/ValidateSearchSql.d.ts +0 -16
- package/dist/src/api/WMS/Controllers/VarDdaController/ValidateUpdateSql.d.ts +0 -16
- package/dist/src/api/WMS/Controllers/VarDdaController/ValidateVarButtonVarName.d.ts +0 -16
- package/dist/src/api/WMS/Controllers/VarDdaController/index.d.ts +0 -9
- package/dist/src/api/WMS/Controllers/VarGridMasterController/QueryByID.d.ts +0 -19
- package/dist/src/api/WMS/Controllers/VarGridMasterController/Update.d.ts +0 -16
- package/dist/src/api/WMS/Controllers/VarGridMasterController/index.d.ts +0 -2
- package/dist/src/api/WMS/Controllers/VarProfileMasterController/QueryByID.d.ts +0 -19
- package/dist/src/api/WMS/Controllers/VarProfileMasterController/index.d.ts +0 -1
- package/dist/src/api/WMS/Controllers/VarVariableController/Delete.d.ts +0 -16
- package/dist/src/api/WMS/Controllers/VarVariableController/index.d.ts +0 -1
- package/dist/src/api/WMS/Controllers/WarehouseController/ListVO.d.ts +0 -25
- package/dist/src/api/WMS/Controllers/WorkstationController/List.d.ts +0 -25
- package/dist/src/api/WMS/Controllers/WorkstationController/index.d.ts +0 -1
- package/dist/src/api/WMS/index.d.ts +0 -2
- package/dist/src/api/WMS/models.d.ts +0 -1128
- package/dist/src/api/api.d.ts +0 -1
- package/dist/src/api/def.d.ts +0 -1
- package/dist/src/api/index.d.ts +0 -2
- package/dist/src/component/KgAppSelect/KgAppSelect.d.ts +0 -46
- package/dist/src/component/KgAppSelect/KgAppSelect.event.d.ts +0 -31
- package/dist/src/component/KgAppSelect/KgAppSelect.hooks.d.ts +0 -18
- package/dist/src/component/KgAppSelect/KgAppSelect.store.d.ts +0 -33
- package/dist/src/component/KgAppSelect/index.d.ts +0 -3
- package/dist/src/component/KgButton/KgButton.Copy.d.ts +0 -40
- package/dist/src/component/KgButton/KgButton.Create.d.ts +0 -40
- package/dist/src/component/KgButton/KgButton.Delete.d.ts +0 -40
- package/dist/src/component/KgButton/KgButton.Export.d.ts +0 -40
- package/dist/src/component/KgButton/KgButton.Import.d.ts +0 -40
- package/dist/src/component/KgButton/KgButton.ImportTemplate.d.ts +0 -40
- package/dist/src/component/KgButton/KgButton.Item.d.ts +0 -39
- package/dist/src/component/KgButton/KgButton.Other.d.ts +0 -40
- package/dist/src/component/KgButton/KgButton.Search.d.ts +0 -40
- package/dist/src/component/KgButton/KgButton.Update.d.ts +0 -40
- package/dist/src/component/KgButton/KgButton.d.ts +0 -39
- package/dist/src/component/KgButton/KgButton.event.d.ts +0 -81
- package/dist/src/component/KgButton/KgButton.hooks.d.ts +0 -67
- package/dist/src/component/KgButton/KgButton.model.d.ts +0 -31
- package/dist/src/component/KgButton/KgButton.store.d.ts +0 -92
- package/dist/src/component/KgCanvas/KgCanvas.ContextMenu.d.ts +0 -100
- package/dist/src/component/KgCanvas/KgCanvas.ToolbarButton.Fullscreen.d.ts +0 -37
- package/dist/src/component/KgCanvas/KgCanvas.ToolbarButton.Mode.d.ts +0 -7
- package/dist/src/component/KgCanvas/KgCanvas.ToolbarButton.OverviewScale.d.ts +0 -37
- package/dist/src/component/KgCanvas/KgCanvas.Tooltip.d.ts +0 -27
- package/dist/src/component/KgCanvas/KgCanvas.d.ts +0 -232
- package/dist/src/component/KgCanvas/KgCanvas.event.d.ts +0 -216
- package/dist/src/component/KgCanvas/KgCanvas.hooks.d.ts +0 -100
- package/dist/src/component/KgCanvas/KgCanvas.model.d.ts +0 -27
- package/dist/src/component/KgCanvas/KgCanvas.service.d.ts +0 -17
- package/dist/src/component/KgCanvas/KgCanvas.store.d.ts +0 -9
- package/dist/src/component/KgCanvas/index.d.ts +0 -4
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.AreaSelect.d.ts +0 -5
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Canvas.d.ts +0 -5
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Canvas.service.d.ts +0 -63
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Legend.d.ts +0 -5
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Offline.d.ts +0 -5
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Setting.d.ts +0 -5
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Tab.Log.d.ts +0 -5
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Tab.Rgv.d.ts +0 -33
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.d.ts +0 -5
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.hooks.d.ts +0 -29
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.model.d.ts +0 -127
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.store.d.ts +0 -354
- package/dist/src/component/KgCircularShuttleMonitor/index.d.ts +0 -3
- package/dist/src/component/KgForm/KgForm.d.ts +0 -413
- package/dist/src/component/KgForm/KgForm.event.d.ts +0 -202
- package/dist/src/component/KgForm/KgForm.hooks.d.ts +0 -92
- package/dist/src/component/KgForm/KgForm.store.d.ts +0 -23
- package/dist/src/component/KgForm/index.d.ts +0 -4
- package/dist/src/component/KgForm.Item/KgForm.Item.Addon.DynamicQueryOperator.d.ts +0 -49
- package/dist/src/component/KgForm.Item/KgForm.Item.Addon.Lookup.Modal.d.ts +0 -16
- package/dist/src/component/KgForm.Item/KgForm.Item.Addon.Lookup.d.ts +0 -31
- package/dist/src/component/KgForm.Item/KgForm.Item.Checkbox.d.ts +0 -98
- package/dist/src/component/KgForm.Item/KgForm.Item.CheckboxGroup.d.ts +0 -95
- package/dist/src/component/KgForm.Item/KgForm.Item.Date.d.ts +0 -95
- package/dist/src/component/KgForm.Item/KgForm.Item.DateRange.d.ts +0 -95
- package/dist/src/component/KgForm.Item/KgForm.Item.Image.d.ts +0 -90
- package/dist/src/component/KgForm.Item/KgForm.Item.Input.d.ts +0 -94
- package/dist/src/component/KgForm.Item/KgForm.Item.InputNumber.d.ts +0 -94
- package/dist/src/component/KgForm.Item/KgForm.Item.InputPassword.d.ts +0 -94
- package/dist/src/component/KgForm.Item/KgForm.Item.Link.d.ts +0 -93
- package/dist/src/component/KgForm.Item/KgForm.Item.RadioGroup.d.ts +0 -96
- package/dist/src/component/KgForm.Item/KgForm.Item.Select.d.ts +0 -95
- package/dist/src/component/KgForm.Item/KgForm.Item.Select.service.d.ts +0 -28
- package/dist/src/component/KgForm.Item/KgForm.Item.Switch.d.ts +0 -94
- package/dist/src/component/KgForm.Item/KgForm.Item.TextArea.d.ts +0 -94
- package/dist/src/component/KgForm.Item/KgForm.Item.d.ts +0 -95
- package/dist/src/component/KgForm.Item/KgForm.Item.model.d.ts +0 -111
- package/dist/src/component/KgForm.Item/KgForm.Item.service.d.ts +0 -17
- package/dist/src/component/KgImage/KgImage.d.ts +0 -100
- package/dist/src/component/KgLayoutHeader/KgLayoutHeader.Locale.d.ts +0 -38
- package/dist/src/component/KgLayoutHeader/KgLayoutHeader.hooks.d.ts +0 -4
- package/dist/src/component/KgLayoutHeader/index.d.ts +0 -2
- package/dist/src/component/KgModal/KgModal.d.ts +0 -817
- package/dist/src/component/KgModal/KgModal.model.d.ts +0 -8
- package/dist/src/component/KgModal/KgModal.service.d.ts +0 -37
- package/dist/src/component/KgModal/KgModalHeaderButtons.d.ts +0 -92
- package/dist/src/component/KgModal02/KgModal02.d.ts +0 -470
- package/dist/src/component/KgModal02/KgModal02.model.d.ts +0 -1
- package/dist/src/component/KgProgressA/KgProgressA.d.ts +0 -85
- package/dist/src/component/KgResizable/KgResizable.d.ts +0 -119
- package/dist/src/component/KgResizable/KgResizable.service.d.ts +0 -12
- package/dist/src/component/KgSearch/KgSearch.d.ts +0 -26
- package/dist/src/component/KgSearch/KgSearch.event.d.ts +0 -31
- package/dist/src/component/KgSearch/KgSearch.hooks.d.ts +0 -72
- package/dist/src/component/KgSearch/KgSearch.service.d.ts +0 -32
- package/dist/src/component/KgSearch/KgSearch.store.d.ts +0 -103
- package/dist/src/component/KgSearch/index.d.ts +0 -3
- package/dist/src/component/KgSimulator/KgSimulator.Canvas.Title.d.ts +0 -11
- package/dist/src/component/KgSimulator/KgSimulator.Canvas.d.ts +0 -11
- package/dist/src/component/KgSimulator/KgSimulator.Canvas.service.d.ts +0 -80
- package/dist/src/component/KgSimulator/KgSimulator.Menu.Scene.Create.CircularConveyor.d.ts +0 -36
- package/dist/src/component/KgSimulator/KgSimulator.Menu.Scene.Open.CircularConveyor.d.ts +0 -36
- package/dist/src/component/KgSimulator/KgSimulator.Menu.d.ts +0 -4
- package/dist/src/component/KgSimulator/KgSimulator.Panel.Prefab.d.ts +0 -4
- package/dist/src/component/KgSimulator/KgSimulator.Panel.Property.d.ts +0 -4
- package/dist/src/component/KgSimulator/KgSimulator.Panel.Scene.d.ts +0 -4
- package/dist/src/component/KgSimulator/KgSimulator.Panel.d.ts +0 -97
- package/dist/src/component/KgSimulator/KgSimulator.Prefab.d.ts +0 -108
- package/dist/src/component/KgSimulator/KgSimulator.ToolbarButton.Prefab.d.ts +0 -9
- package/dist/src/component/KgSimulator/KgSimulator.ToolbarButton.Property.d.ts +0 -9
- package/dist/src/component/KgSimulator/KgSimulator.ToolbarButton.Scene.d.ts +0 -9
- package/dist/src/component/KgSimulator/KgSimulator.ToolbarButton.d.ts +0 -113
- package/dist/src/component/KgSimulator/KgSimulator.d.ts +0 -33
- package/dist/src/component/KgSimulator/KgSimulator.event.d.ts +0 -93
- package/dist/src/component/KgSimulator/KgSimulator.hooks.d.ts +0 -103
- package/dist/src/component/KgSimulator/KgSimulator.icons.d.ts +0 -10
- package/dist/src/component/KgSimulator/KgSimulator.model.d.ts +0 -1502
- package/dist/src/component/KgSimulator/KgSimulator.store.d.ts +0 -474
- package/dist/src/component/KgSimulator/KgSimulator.utils.d.ts +0 -21
- package/dist/src/component/KgSimulator/index.d.ts +0 -3
- package/dist/src/component/KgSubmit/KgSubmit.d.ts +0 -21
- package/dist/src/component/KgSubmit/KgSubmit.event.d.ts +0 -135
- package/dist/src/component/KgSubmit/KgSubmit.hooks.d.ts +0 -358
- package/dist/src/component/KgSubmit/KgSubmit.model.d.ts +0 -57
- package/dist/src/component/KgSubmit/KgSubmit.service.d.ts +0 -29
- package/dist/src/component/KgSubmit/KgSubmit.store.d.ts +0 -112
- package/dist/src/component/KgSubmit/index.d.ts +0 -4
- package/dist/src/component/KgTable/KgTable.BodyCell.d.ts +0 -60
- package/dist/src/component/KgTable/KgTable.HeadCell.d.ts +0 -51
- package/dist/src/component/KgTable/KgTable.Info.d.ts +0 -57
- package/dist/src/component/KgTable/KgTable.Setting.VarGridMaster.SaveAs.d.ts +0 -4
- package/dist/src/component/KgTable/KgTable.Setting.d.ts +0 -20
- package/dist/src/component/KgTable/KgTable.Setting.service.d.ts +0 -22
- package/dist/src/component/KgTable/KgTable.d.ts +0 -39
- package/dist/src/component/KgTable/KgTable.event.d.ts +0 -111
- package/dist/src/component/KgTable/KgTable.hooks.d.ts +0 -135
- package/dist/src/component/KgTable/KgTable.model.d.ts +0 -65
- package/dist/src/component/KgTable/KgTable.service.d.ts +0 -34
- package/dist/src/component/KgTable/KgTable.store.d.ts +0 -91
- package/dist/src/component/KgTable/index.d.ts +0 -4
- package/dist/src/component/KgTable02/KgTable02.BodyCell.d.ts +0 -72
- package/dist/src/component/KgTable02/KgTable02.d.ts +0 -46
- package/dist/src/component/KgTable02/KgTable02.event.d.ts +0 -123
- package/dist/src/component/KgTable02/KgTable02.hooks.d.ts +0 -62
- package/dist/src/component/KgTable02/KgTable02.store.d.ts +0 -62
- package/dist/src/component/KgTable02/index.d.ts +0 -4
- package/dist/src/component/KgVar/KgVar.Factory.d.ts +0 -106
- package/dist/src/component/KgVar/KgVar.d.ts +0 -120
- package/dist/src/component/KgVar/KgVar.event.d.ts +0 -75
- package/dist/src/component/KgVar/KgVar.hooks.d.ts +0 -307
- package/dist/src/component/KgVar/KgVar.model.d.ts +0 -70
- package/dist/src/component/KgVar/KgVar.store.d.ts +0 -269
- package/dist/src/component/KgVar/index.d.ts +0 -5
- package/dist/src/component/KgVarConfig/KgVarConfig.d.ts +0 -3
- package/dist/src/component/KgVarConfig/KgVarConfig.hooks.d.ts +0 -3
- package/dist/src/component/KgVarConfig/KgVarConfig.model.d.ts +0 -42
- package/dist/src/component/KgVarConfig/KgVarConfig.store.d.ts +0 -16
- package/dist/src/component/KgVarConfig/components/KgVarConfig.SelectFormIdModal.d.ts +0 -27
- package/dist/src/component/KgVarConfig/components/KgVarConfigModal.d.ts +0 -53
- package/dist/src/component/KgVarConfig/components/button/KgVarConfig.Modal.Button.VarButton.d.ts +0 -7
- package/dist/src/component/KgVarConfig/components/button/KgVarConfig.Modal.Button.VarButtonConfig.d.ts +0 -7
- package/dist/src/component/KgVarConfig/components/button/KgVarConfig.Modal.Button.d.ts +0 -5
- package/dist/src/component/KgVarConfig/components/child/KgVarConfig.Modal.Child.d.ts +0 -7
- package/dist/src/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.VarProfileConfig.d.ts +0 -7
- package/dist/src/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.VarProfileMaster.d.ts +0 -7
- package/dist/src/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.VarProfileMaster.service.d.ts +0 -17
- package/dist/src/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.d.ts +0 -5
- package/dist/src/component/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.VarSubmitConfig.d.ts +0 -7
- package/dist/src/component/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.VarSubmitDetail.d.ts +0 -7
- package/dist/src/component/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.d.ts +0 -5
- package/dist/src/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.VarGridConfig.d.ts +0 -7
- package/dist/src/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.VarGridMaster.d.ts +0 -7
- package/dist/src/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.VarGridMaster.service.d.ts +0 -23
- package/dist/src/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.d.ts +0 -5
- package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigControl.d.ts +0 -2
- package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigDescription.d.ts +0 -2
- package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigInput.d.ts +0 -2
- package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigLookup.d.ts +0 -2
- package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigPossibility.d.ts +0 -2
- package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigTip.d.ts +0 -2
- package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarVariable.d.ts +0 -2
- package/dist/src/component/KgVarConfig/index.d.ts +0 -3
- package/dist/src/component/KgWarehouse/KgWarehouse.d.ts +0 -50
- package/dist/src/component/KgWarehouse/KgWarehouse.event.d.ts +0 -30
- package/dist/src/component/KgWarehouse/KgWarehouse.guard.d.ts +0 -8
- package/dist/src/component/KgWarehouse/KgWarehouse.hooks.d.ts +0 -41
- package/dist/src/component/KgWarehouse/KgWarehouse.store.d.ts +0 -27
- package/dist/src/component/KgWarehouse/index.d.ts +0 -4
- package/dist/src/component/KgYesOrNo/KgYesOrNo.d.ts +0 -60
- package/dist/src/component/index.d.ts +0 -21
- package/dist/src/config/config.hooks.d.ts +0 -10
- package/dist/src/config/config.store.d.ts +0 -307
- package/dist/src/config/index.d.ts +0 -63
- package/dist/src/const/const.model.d.ts +0 -1768
- package/dist/src/const/form-id.const.d.ts +0 -44
- package/dist/src/const/index.d.ts +0 -2
- package/dist/src/i18n/cs_CZ.d.ts +0 -2
- package/dist/src/i18n/en.d.ts +0 -237
- package/dist/src/i18n/es_ES.d.ts +0 -2
- package/dist/src/i18n/fr_FR.d.ts +0 -2
- package/dist/src/i18n/i18n.setup.d.ts +0 -22
- package/dist/src/i18n/index.d.ts +0 -3
- package/dist/src/i18n/km_KH.d.ts +0 -2
- package/dist/src/i18n/ko_KR.d.ts +0 -2
- package/dist/src/i18n/vi_VN.d.ts +0 -2
- package/dist/src/i18n/zh_CN.d.ts +0 -238
- package/dist/src/index.d.ts +0 -12
- package/dist/src/page/KgPageCircularShuttleMonitor/KgPageCircularShuttleMonitor.d.ts +0 -11
- package/dist/src/page/KgPageDda/KgPageDda.d.ts +0 -8
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.Basic.SqlModal.d.ts +0 -32
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.Basic.d.ts +0 -7
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.Button.d.ts +0 -7
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.Menu.d.ts +0 -7
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.Search.d.ts +0 -7
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.Submit.d.ts +0 -7
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.Table.d.ts +0 -7
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.d.ts +0 -33
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.store.d.ts +0 -39
- package/dist/src/page/KgPageDda/index.d.ts +0 -5
- package/dist/src/page/KgPageSqlClient/KgPageSqlClient.d.ts +0 -12
- package/dist/src/page/KgPageSqlClient/components/KgSqlClient.Editor.d.ts +0 -13
- package/dist/src/page/KgPageSqlClient/components/KgSqlClient.ResultTab.d.ts +0 -36
- package/dist/src/page/KgPageSqlClient/components/KgSqlClient.Toolbar.Top.d.ts +0 -7
- package/dist/src/page/KgPageSqlClient/components/KgSqlClient.d.ts +0 -5
- package/dist/src/page/index.d.ts +0 -8
- package/dist/src/project/build/getConfigFileName.d.ts +0 -5
- package/dist/src/project/build/index.d.ts +0 -1
- package/dist/src/project/src/api/sys/menu.d.ts +0 -4
- package/dist/src/project/src/api/sys/model/menuModel.d.ts +0 -15
- package/dist/src/project/src/api/sys/model/userModel.d.ts +0 -46
- package/dist/src/project/src/components/Application/src/useAppContext.d.ts +0 -9
- package/dist/src/project/src/components/index.d.ts +0 -2
- package/dist/src/project/src/enums/CompTypeEnum.d.ts +0 -19
- package/dist/src/project/src/enums/DateTypeEnum.d.ts +0 -8
- package/dist/src/project/src/enums/appEnum.d.ts +0 -40
- package/dist/src/project/src/enums/breakpointEnum.d.ts +0 -18
- package/dist/src/project/src/enums/cacheEnum.d.ts +0 -18
- package/dist/src/project/src/enums/exceptionEnum.d.ts +0 -17
- package/dist/src/project/src/enums/httpEnum.d.ts +0 -38
- package/dist/src/project/src/enums/jeecgEnum.d.ts +0 -16
- package/dist/src/project/src/enums/menuEnum.d.ts +0 -35
- package/dist/src/project/src/enums/pageEnum.d.ts +0 -14
- package/dist/src/project/src/enums/roleEnum.d.ts +0 -4
- package/dist/src/project/src/enums/sizeEnum.d.ts +0 -18
- package/dist/src/project/src/hooks/component/useFormItem.d.ts +0 -2
- package/dist/src/project/src/hooks/component/usePageContext.d.ts +0 -10
- package/dist/src/project/src/hooks/core/onMountedOrActivated.d.ts +0 -1
- package/dist/src/project/src/hooks/core/useAttrs.d.ts +0 -9
- package/dist/src/project/src/hooks/core/useContext.d.ts +0 -11
- package/dist/src/project/src/hooks/core/useRefs.d.ts +0 -2
- package/dist/src/project/src/hooks/core/useTimeout.d.ts +0 -10
- package/dist/src/project/src/hooks/event/useBreakpoint.d.ts +0 -22
- package/dist/src/project/src/hooks/event/useEventListener.d.ts +0 -14
- package/dist/src/project/src/hooks/event/useIntersectionObserver.d.ts +0 -13
- package/dist/src/project/src/hooks/event/useScrollTo.d.ts +0 -10
- package/dist/src/project/src/hooks/event/useWindowSizeFn.d.ts +0 -7
- package/dist/src/project/src/hooks/index.d.ts +0 -21
- package/dist/src/project/src/hooks/jeecg/useAdaptiveWidth.d.ts +0 -18
- package/dist/src/project/src/hooks/setting/index.d.ts +0 -2
- package/dist/src/project/src/hooks/web/useAppInject.d.ts +0 -3
- package/dist/src/project/src/hooks/web/useContentHeight.d.ts +0 -24
- package/dist/src/project/src/hooks/web/useCopyToClipboard.d.ts +0 -10
- package/dist/src/project/src/hooks/web/useDesign.d.ts +0 -4
- package/dist/src/project/src/hooks/web/usePage.d.ts +0 -10
- package/dist/src/project/src/hooks/web/usePagination.d.ts +0 -7
- package/dist/src/project/src/hooks/web/useWebSocket.d.ts +0 -18
- package/dist/src/project/src/layouts/default/content/useContentContext.d.ts +0 -9
- package/dist/src/project/src/layouts/default/content/useContentViewHeight.d.ts +0 -7
- package/dist/src/project/src/locales/helper.d.ts +0 -5
- package/dist/src/project/src/locales/setupI18n.d.ts +0 -4
- package/dist/src/project/src/locales/useLocale.d.ts +0 -11
- package/dist/src/project/src/router/constant2.d.ts +0 -3
- package/dist/src/project/src/router/types.d.ts +0 -61
- package/dist/src/project/src/settings/componentSetting.d.ts +0 -44
- package/dist/src/project/src/settings/designSetting.d.ts +0 -6
- package/dist/src/project/src/settings/encryptionSetting.d.ts +0 -6
- package/dist/src/project/src/settings/projectSetting.d.ts +0 -3
- package/dist/src/project/src/store/modules/locale.d.ts +0 -38
- package/dist/src/project/src/utils/auth/index.d.ts +0 -19
- package/dist/src/project/src/utils/bem.d.ts +0 -15
- package/dist/src/project/src/utils/cache/index.d.ts +0 -7
- package/dist/src/project/src/utils/cache/memory.d.ts +0 -22
- package/dist/src/project/src/utils/cache/persistent.d.ts +0 -33
- package/dist/src/project/src/utils/cache/storageCache.d.ts +0 -8
- package/dist/src/project/src/utils/cipher.d.ts +0 -19
- package/dist/src/project/src/utils/color.d.ts +0 -29
- package/dist/src/project/src/utils/common/compUtils.d.ts +0 -87
- package/dist/src/project/src/utils/common/functionUtils.d.ts +0 -6
- package/dist/src/project/src/utils/dateUtil.d.ts +0 -4
- package/dist/src/project/src/utils/domUtils.d.ts +0 -28
- package/dist/src/project/src/utils/encryption/signMd5Utils.d.ts +0 -29
- package/dist/src/project/src/utils/env.d.ts +0 -16
- package/dist/src/project/src/utils/event/index.d.ts +0 -3
- package/dist/src/project/src/utils/factory/createAsyncComponent.d.ts +0 -9
- package/dist/src/project/src/utils/file/base64Conver.d.ts +0 -4
- package/dist/src/project/src/utils/file/download.d.ts +0 -9
- package/dist/src/project/src/utils/helper/treeHelper.d.ts +0 -34
- package/dist/src/project/src/utils/helper/tsxHelper.d.ts +0 -13
- package/dist/src/project/src/utils/index.index.d.ts +0 -42
- package/dist/src/project/src/utils/is.d.ts +0 -17
- package/dist/src/project/src/utils/mitt.d.ts +0 -26
- package/dist/src/project/src/utils/propTypes.d.ts +0 -9
- package/dist/src/project/src/utils/props.d.ts +0 -68
- package/dist/src/project/src/utils/uuid.d.ts +0 -2
- package/dist/src/project/types/axios.d.ts +0 -35
- package/dist/src/project/types/config.d.ts +0 -119
- package/dist/src/project/types/store.d.ts +0 -43
- package/dist/src/project/types/utils.d.ts +0 -4
- package/dist/src/service/http-client.d.ts +0 -98
- package/dist/src/util/ant-design-vue.d.ts +0 -347
- package/dist/src/util/event.util.d.ts +0 -15
- package/dist/src/util/kg-auth.util.d.ts +0 -12
- package/dist/src/util/kg-route.util.d.ts +0 -18
- package/dist/src/util/kg.util.d.ts +0 -349
- package/dist/src/util/tsx.helper.d.ts +0 -23
- package/dist/stop-outlined.9f2c4f61.mjs +0 -8
- package/dist/stop.ea3dde55.mjs +0 -8
- package/dist/three-dots-loading-bIlrTJYR.f189f620.mjs +0 -8
- package/dist/upload-outlined.c576b26a.mjs +0 -8
- /package/{dist/src/api/WMS/Controllers/VarConfigDescriptionController/index.d.ts → api/WMS/Controllers/VarConfigDescriptionController/index.ts} +0 -0
- /package/{dist/src/api/WMS/Controllers/WarehouseController/index.d.ts → api/WMS/Controllers/WarehouseController/index.ts} +0 -0
- /package/{dist/src/api/WMS/Controllers/index.d.ts → api/WMS/Controllers/index.ts} +0 -0
- /package/{dist/src/component/KgButton/index.d.ts → component/KgButton/index.ts} +0 -0
- /package/{dist/src/component/KgForm.Item/index.d.ts → component/KgForm.Item/index.ts} +0 -0
- /package/{dist/src/component/KgImage/index.d.ts → component/KgImage/index.ts} +0 -0
- /package/{dist/src/component/KgModal/index.d.ts → component/KgModal/index.ts} +0 -0
- /package/{dist/src/component/KgModal02/index.d.ts → component/KgModal02/index.ts} +0 -0
- /package/{dist/src/component/KgProgressA/index.d.ts → component/KgProgressA/index.ts} +0 -0
- /package/{dist/src/component/KgResizable/index.d.ts → component/KgResizable/index.ts} +0 -0
- /package/{dist/src/component/KgSearch/KgSearch.model.d.ts → component/KgSearch/KgSearch.model.ts} +0 -0
- /package/{dist/src/component/KgTable02/KgTable02.model.d.ts → component/KgTable02/KgTable02.model.ts} +0 -0
- /package/{dist/src/component/KgYesOrNo/index.d.ts → component/KgYesOrNo/index.ts} +0 -0
- /package/{dist/src/page/KgPageCircularShuttleMonitor/index.d.ts → page/KgPageCircularShuttleMonitor/index.ts} +0 -0
- /package/{dist/src/page/KgPageSqlClient/index.d.ts → page/KgPageSqlClient/index.ts} +0 -0
- /package/{dist/project → project}/build/constant.ts +0 -0
- /package/{dist/project → project}/build/generate/icon/index.ts +0 -0
- /package/{dist/project → project}/build/getConfigFileName.ts +0 -0
- /package/{dist/project → project}/build/index.ts +0 -0
- /package/{dist/project → project}/build/script/buildConf.ts +0 -0
- /package/{dist/project → project}/build/script/postBuild.ts +0 -0
- /package/{dist/project → project}/build/utils.ts +0 -0
- /package/{dist/project → project}/build/vite/plugin/compress.ts +0 -0
- /package/{dist/project → project}/build/vite/plugin/html.ts +0 -0
- /package/{dist/project → project}/build/vite/plugin/imagemin.ts +0 -0
- /package/{dist/project → project}/build/vite/plugin/index.ts +0 -0
- /package/{dist/project → project}/build/vite/plugin/pwa.ts +0 -0
- /package/{dist/project → project}/build/vite/plugin/styleImport.ts +0 -0
- /package/{dist/project → project}/build/vite/plugin/svgSprite.ts +0 -0
- /package/{dist/project → project}/build/vite/plugin/theme.ts +0 -0
- /package/{dist/project → project}/build/vite/plugin/visualizer.ts +0 -0
- /package/{dist/project → project}/build/vite/proxy.ts +0 -0
- /package/{dist/src/project/index.d.ts → project/index.ts} +0 -0
- /package/{dist/src/project/src/api/index.d.ts → project/src/api/index.ts} +0 -0
- /package/{dist/src/project/src/api/sys/model/uploadModel.d.ts → project/src/api/sys/model/uploadModel.ts} +0 -0
- /package/{dist/src/project/src/components/Dropdown/index.d.ts → project/src/components/Dropdown/index.ts} +0 -0
- /package/{dist/src/project/src/components/Dropdown/src/typing.d.ts → project/src/components/Dropdown/src/typing.ts} +0 -0
- /package/{dist/src/project/src/enums/index.d.ts → project/src/enums/index.ts} +0 -0
- /package/{dist/src/project/src/index.d.ts → project/src/index.ts} +0 -0
- /package/{dist/src/project/src/layouts/index.d.ts → project/src/layouts/index.ts} +0 -0
- /package/{dist/src/project/src/locales/index.d.ts → project/src/locales/index.ts} +0 -0
- /package/{dist/src/project/src/router/index.d.ts → project/src/router/index.ts} +0 -0
- /package/{dist/src/project/src/settings/index.d.ts → project/src/settings/index.ts} +0 -0
- /package/{dist/src/project/src/store/index.d.ts → project/src/store/index.ts} +0 -0
- /package/{dist/src/project/src/store/modules/index.d.ts → project/src/store/modules/index.ts} +0 -0
- /package/{dist/src/project/src/utils/index.d.ts → project/src/utils/index.ts} +0 -0
- /package/{dist/src/project/types/index.d.ts → project/types/index.ts} +0 -0
- /package/{dist/src/service/index.d.ts → service/index.ts} +0 -0
- /package/{dist/src/util/index.d.ts → util/index.ts} +0 -0
|
@@ -0,0 +1,1105 @@
|
|
|
1
|
+
import { ____ERROR____ } from '@kengic/core.core';
|
|
2
|
+
import { Q } from '@thymine/xunee';
|
|
3
|
+
import { notification } from 'ant-design-vue';
|
|
4
|
+
import { debounce, last } from 'lodash-es';
|
|
5
|
+
import { defineComponent, ExtractPropTypes, inject, onMounted, onUnmounted } from 'vue';
|
|
6
|
+
import './KgSimulator.css';
|
|
7
|
+
import './KgSimulator.icons';
|
|
8
|
+
import { KG } from '../../model';
|
|
9
|
+
import { KgCanvas, useKgCanvas } from '../KgCanvas';
|
|
10
|
+
import { IKgForm$EventListenerParameter$onChange } from '../KgForm/KgForm.event';
|
|
11
|
+
import { useKgVar } from '../KgVar';
|
|
12
|
+
import { useDraw } from './KgSimulator.Canvas.service';
|
|
13
|
+
import { emit, IKgSimulator$EventListenerParameter$on$KgSimulatorCanvas$CreateData, IKgSimulator$EventListenerParameter$on$KgSimulatorCanvas$DeleteData } from './KgSimulator.event';
|
|
14
|
+
import { useKgSimulator } from './KgSimulator.hooks';
|
|
15
|
+
import {
|
|
16
|
+
Agent,
|
|
17
|
+
AgentCreatedMessage,
|
|
18
|
+
IDragDataTransferData,
|
|
19
|
+
INodeProperty,
|
|
20
|
+
newCGQ,
|
|
21
|
+
newCreator,
|
|
22
|
+
newDestroyer,
|
|
23
|
+
newDPJ,
|
|
24
|
+
newEdge,
|
|
25
|
+
newSSJ,
|
|
26
|
+
newYZJ,
|
|
27
|
+
NODE_KEY,
|
|
28
|
+
NODE_UI_KEY,
|
|
29
|
+
PlcActionRequestWebSocketMessage,
|
|
30
|
+
Station,
|
|
31
|
+
WEBSOCKET_PONG_TYPE,
|
|
32
|
+
} from './KgSimulator.model';
|
|
33
|
+
|
|
34
|
+
export const getProps = () => ({}) as any;
|
|
35
|
+
|
|
36
|
+
export type IKgSimulatorCanvasProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 模拟器--画布.
|
|
40
|
+
*/
|
|
41
|
+
export const KgSimulatorCanvas = defineComponent({
|
|
42
|
+
name: 'KgSimulatorCanvas',
|
|
43
|
+
props: getProps(),
|
|
44
|
+
setup(props) {
|
|
45
|
+
const ID = inject(KG.DI.ID, '');
|
|
46
|
+
|
|
47
|
+
const $KgSimulatorPanelProperty$kgVar = useKgVar(KG.FORM_ID__KG_SIMULATOR__PANEL__PROPERTY);
|
|
48
|
+
const kgSimulator = useKgSimulator();
|
|
49
|
+
const kgCanvas = useKgCanvas(kgSimulator.$KgCanvas$id);
|
|
50
|
+
|
|
51
|
+
const useDrawHook = useDraw();
|
|
52
|
+
|
|
53
|
+
kgCanvas.onInit(async (param) => {
|
|
54
|
+
param.graph.styles[Q.Styles.SELECTION_COLOR] = '#000000';
|
|
55
|
+
param.graph.styles[Q.Styles.SELECTION_SHADOW_BLUR] = 0;
|
|
56
|
+
|
|
57
|
+
kgSimulator.set$graph(param.graph);
|
|
58
|
+
|
|
59
|
+
param.graph.minScale = 0.0001;
|
|
60
|
+
param.graph.scale = 0.0001;
|
|
61
|
+
|
|
62
|
+
return false;
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
//region 事件: 重新加载
|
|
66
|
+
//----------------------------------------------------------------------------------------------------
|
|
67
|
+
kgCanvas.onReload(async (param) => {
|
|
68
|
+
switch (true) {
|
|
69
|
+
case kgSimulator.$Mode$IsEdit: {
|
|
70
|
+
param.graph.moveToCenter(0.0001, false);
|
|
71
|
+
useDrawHook.draw({ isZoomToOverview: true });
|
|
72
|
+
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
case kgSimulator.$Mode$IsMonitor: {
|
|
77
|
+
param.graph.moveToCenter(0.0001, false);
|
|
78
|
+
useDrawHook.draw({ isZoomToOverview: true });
|
|
79
|
+
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
case kgSimulator.$Mode$IsSimulate: {
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return false;
|
|
89
|
+
});
|
|
90
|
+
//endregion
|
|
91
|
+
//----------------------------------------------------------------------------------------------------
|
|
92
|
+
|
|
93
|
+
kgCanvas.onResize(async ({ graph, width, height }) => {
|
|
94
|
+
return false;
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
kgCanvas.onClick(async ({ graph, element }) => {
|
|
98
|
+
return false;
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
kgCanvas.onRightClick(async ({ graph, element, contextMenus }) => {
|
|
102
|
+
return false;
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
kgCanvas.onMouseEnter(async ({ graph, element }) => {
|
|
106
|
+
return false;
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
kgCanvas.onMouseLeave(async ({ graph, element }) => {
|
|
110
|
+
return false;
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
kgCanvas.onContextMenuOpen(async () => {
|
|
114
|
+
return false;
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
kgCanvas.onContextMenuClose(async () => {
|
|
118
|
+
return false;
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
//region 事件: 图元属性发生变更
|
|
122
|
+
//----------------------------------------------------------------------------------------------------
|
|
123
|
+
const $KgCanvas$onDataPropertyChangeListener = debounce(
|
|
124
|
+
async (param) => {
|
|
125
|
+
switch (param.event.kind) {
|
|
126
|
+
//region 坐标
|
|
127
|
+
//----------------------------------------------------------------------------------------------------
|
|
128
|
+
case 'location': {
|
|
129
|
+
// @ts-ignore
|
|
130
|
+
if (param.event.oldValue) {
|
|
131
|
+
const node = param.event.source;
|
|
132
|
+
const elementProperties = node.properties as INodeProperty;
|
|
133
|
+
const x = param.event.value.x;
|
|
134
|
+
const y = param.event.value.y;
|
|
135
|
+
|
|
136
|
+
//region 图元用户属性
|
|
137
|
+
//----------------------------------------------------------------------------------------------------
|
|
138
|
+
elementProperties.data.x = x;
|
|
139
|
+
elementProperties.data.y = y;
|
|
140
|
+
//----------------------------------------------------------------------------------------------------
|
|
141
|
+
//endregion
|
|
142
|
+
|
|
143
|
+
//region 场景属性
|
|
144
|
+
//----------------------------------------------------------------------------------------------------
|
|
145
|
+
const scene = kgSimulator.$Env$CircularConveyor$CurrentScene;
|
|
146
|
+
|
|
147
|
+
const creator = scene!.creators!.find((i) => i.id === elementProperties.data.id);
|
|
148
|
+
if (creator) {
|
|
149
|
+
creator.x = x;
|
|
150
|
+
creator.y = y;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
const destroyer = scene!.destroyers!.find((i) => i.id === elementProperties.data.id);
|
|
154
|
+
if (destroyer) {
|
|
155
|
+
destroyer.x = x;
|
|
156
|
+
destroyer.y = y;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
const ptssj = scene!.stations!.find((i) => i.id === elementProperties.data.id);
|
|
160
|
+
if (ptssj) {
|
|
161
|
+
ptssj.x = x;
|
|
162
|
+
ptssj.y = y;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const dsyzj = scene!.jackUpTransferStations!.find((i) => i.id === elementProperties.data.id);
|
|
166
|
+
if (dsyzj) {
|
|
167
|
+
dsyzj.x = x;
|
|
168
|
+
dsyzj.y = y;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
const dpj = scene!.palletStackerStations!.find((i) => i.id === elementProperties.data.id);
|
|
172
|
+
if (dpj) {
|
|
173
|
+
dpj.x = x;
|
|
174
|
+
dpj.y = y;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
const gdcgq = scene!.photoelectricSensors!.find((i) => i.id === elementProperties.data.id);
|
|
178
|
+
if (gdcgq) {
|
|
179
|
+
gdcgq.x = x;
|
|
180
|
+
gdcgq.y = y;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
const agent = scene!.agents!.find((i) => i.id === elementProperties.data.id);
|
|
184
|
+
if (agent) {
|
|
185
|
+
agent.x = x;
|
|
186
|
+
agent.y = y;
|
|
187
|
+
}
|
|
188
|
+
//----------------------------------------------------------------------------------------------------
|
|
189
|
+
//endregion
|
|
190
|
+
}
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
//----------------------------------------------------------------------------------------------------
|
|
194
|
+
//endregion
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
return false;
|
|
198
|
+
},
|
|
199
|
+
100,
|
|
200
|
+
{ leading: false, trailing: true },
|
|
201
|
+
);
|
|
202
|
+
kgCanvas.onDataPropertyChange($KgCanvas$onDataPropertyChangeListener as any);
|
|
203
|
+
|
|
204
|
+
kgSimulator.on$KgSimulatorMenu$Scene$Create(async () => {
|
|
205
|
+
useDrawHook.draw({ isZoomToOverview: true });
|
|
206
|
+
|
|
207
|
+
return false;
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
kgSimulator.on$KgSimulatorMenu$Scene$Import(async () => {
|
|
211
|
+
useDrawHook.draw({ isZoomToOverview: true });
|
|
212
|
+
|
|
213
|
+
return false;
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
kgSimulator.on$KgSimulatorMenu$Scene$Open(async () => {
|
|
217
|
+
useDrawHook.draw({ isZoomToOverview: true });
|
|
218
|
+
|
|
219
|
+
return false;
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
//----------------------------------------------------------------------------------------------------
|
|
223
|
+
//endregion
|
|
224
|
+
|
|
225
|
+
//region 事件: 拖拽落下
|
|
226
|
+
//----------------------------------------------------------------------------------------------------
|
|
227
|
+
kgCanvas.onDrop(async ({ event }) => {
|
|
228
|
+
/**
|
|
229
|
+
* 拖拽落下的点.
|
|
230
|
+
*/
|
|
231
|
+
const dropPoint: Q.Point = kgSimulator.get$graph()!.toLogical(event);
|
|
232
|
+
const data = JSON.parse(event.dataTransfer?.getData('text/plain') || '{}') as IDragDataTransferData;
|
|
233
|
+
|
|
234
|
+
switch (true) {
|
|
235
|
+
case kgSimulator.$Config$Env$IsCircularConveyor: {
|
|
236
|
+
switch (data.type) {
|
|
237
|
+
//region 创建者
|
|
238
|
+
//----------------------------------------------------------------------------------------------------
|
|
239
|
+
case NODE_KEY.CJZ: {
|
|
240
|
+
const dropUi = kgSimulator.get$graph()!.hitTest(event);
|
|
241
|
+
const dropNode = dropUi?.parent?.data as Q.Node | undefined;
|
|
242
|
+
|
|
243
|
+
if (!dropUi || !dropNode || ![NODE_KEY.SSJ, NODE_KEY.YZJ, NODE_KEY.DPJ].includes((dropNode.properties as INodeProperty)?.type ?? '')) {
|
|
244
|
+
notification.error({ message: '创建者必须拖到某个「普通输送机」或者「移栽机」或者「叠盘机」上面' });
|
|
245
|
+
break;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
const creator = newCreator({ sceneId: kgSimulator.$Env$CircularConveyor$CurrentScene?.id, x: dropNode.x, y: dropNode.y });
|
|
249
|
+
|
|
250
|
+
emit<IKgSimulator$EventListenerParameter$on$KgSimulatorCanvas$CreateData>({
|
|
251
|
+
event: 'on$KgSimulatorCanvas$CreateData',
|
|
252
|
+
id: ID,
|
|
253
|
+
parameter: {
|
|
254
|
+
data: creator,
|
|
255
|
+
type: NODE_KEY.CJZ,
|
|
256
|
+
},
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
const creatorNode = useDrawHook.$CircularConveyor$drawCJZ({ creator: creator });
|
|
260
|
+
if (creatorNode) {
|
|
261
|
+
kgSimulator.get$graph()!.setSelection(creatorNode);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
break;
|
|
265
|
+
}
|
|
266
|
+
//----------------------------------------------------------------------------------------------------
|
|
267
|
+
//endregion
|
|
268
|
+
|
|
269
|
+
//region 销毁者
|
|
270
|
+
//----------------------------------------------------------------------------------------------------
|
|
271
|
+
case NODE_KEY.XHZ: {
|
|
272
|
+
const dropUi = kgSimulator.get$graph()!.hitTest(event);
|
|
273
|
+
const dropNode = dropUi?.parent?.data as Q.Node | undefined;
|
|
274
|
+
|
|
275
|
+
if (!dropUi || !dropNode || ![NODE_KEY.SSJ, NODE_KEY.YZJ, NODE_KEY.DPJ].includes((dropNode.properties as INodeProperty).type)) {
|
|
276
|
+
notification.error({ message: '销毁者必须拖到某个「普通输送机」或者「移栽机」或者「叠盘机」上面' });
|
|
277
|
+
break;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
const destroyer = newDestroyer({ sceneId: kgSimulator.$Env$CircularConveyor$CurrentScene?.id, x: dropNode.x, y: dropNode.y });
|
|
281
|
+
|
|
282
|
+
emit<IKgSimulator$EventListenerParameter$on$KgSimulatorCanvas$CreateData>({
|
|
283
|
+
event: 'on$KgSimulatorCanvas$CreateData',
|
|
284
|
+
id: ID,
|
|
285
|
+
parameter: {
|
|
286
|
+
data: destroyer,
|
|
287
|
+
type: NODE_KEY.XHZ,
|
|
288
|
+
},
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
const destroyerNode = useDrawHook.$CircularConveyor$drawXHZ({ destroyer: destroyer });
|
|
292
|
+
if (destroyerNode) {
|
|
293
|
+
kgSimulator.get$graph()!.setSelection(destroyerNode);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
break;
|
|
297
|
+
}
|
|
298
|
+
//----------------------------------------------------------------------------------------------------
|
|
299
|
+
//endregion
|
|
300
|
+
|
|
301
|
+
//region 输送机
|
|
302
|
+
//----------------------------------------------------------------------------------------------------
|
|
303
|
+
case NODE_KEY.SSJ: {
|
|
304
|
+
const ptssj = newSSJ({ sceneId: kgSimulator.$Env$CircularConveyor$CurrentScene?.id, x: dropPoint.x, y: dropPoint.y });
|
|
305
|
+
|
|
306
|
+
emit<IKgSimulator$EventListenerParameter$on$KgSimulatorCanvas$CreateData>({
|
|
307
|
+
event: 'on$KgSimulatorCanvas$CreateData',
|
|
308
|
+
id: ID,
|
|
309
|
+
parameter: {
|
|
310
|
+
data: ptssj,
|
|
311
|
+
type: NODE_KEY.SSJ,
|
|
312
|
+
},
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
const ptssjNode = useDrawHook.$CircularConveyor$drawSSJ({ ptssj: ptssj });
|
|
316
|
+
if (ptssjNode) {
|
|
317
|
+
kgSimulator.get$graph()!.setSelection(ptssjNode);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
break;
|
|
321
|
+
}
|
|
322
|
+
//----------------------------------------------------------------------------------------------------
|
|
323
|
+
//endregion
|
|
324
|
+
|
|
325
|
+
//region 移栽机
|
|
326
|
+
//----------------------------------------------------------------------------------------------------
|
|
327
|
+
case NODE_KEY.YZJ: {
|
|
328
|
+
const dsyzj = newYZJ({ sceneId: kgSimulator.$Env$CircularConveyor$CurrentScene?.id, x: dropPoint.x, y: dropPoint.y });
|
|
329
|
+
|
|
330
|
+
emit<IKgSimulator$EventListenerParameter$on$KgSimulatorCanvas$CreateData>({
|
|
331
|
+
event: 'on$KgSimulatorCanvas$CreateData',
|
|
332
|
+
id: ID,
|
|
333
|
+
parameter: {
|
|
334
|
+
data: dsyzj,
|
|
335
|
+
type: NODE_KEY.YZJ,
|
|
336
|
+
},
|
|
337
|
+
});
|
|
338
|
+
|
|
339
|
+
const dsyzjNode = useDrawHook.$CircularConveyor$drawYZJ({ dsyzj: dsyzj });
|
|
340
|
+
if (dsyzjNode) {
|
|
341
|
+
kgSimulator.get$graph()!.setSelection(dsyzjNode);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
break;
|
|
345
|
+
}
|
|
346
|
+
//----------------------------------------------------------------------------------------------------
|
|
347
|
+
//endregion
|
|
348
|
+
|
|
349
|
+
//region 叠盘机
|
|
350
|
+
//----------------------------------------------------------------------------------------------------
|
|
351
|
+
case NODE_KEY.DPJ: {
|
|
352
|
+
const dpj = newDPJ({ sceneId: kgSimulator.$Env$CircularConveyor$CurrentScene?.id, x: dropPoint.x, y: dropPoint.y });
|
|
353
|
+
|
|
354
|
+
emit<IKgSimulator$EventListenerParameter$on$KgSimulatorCanvas$CreateData>({
|
|
355
|
+
event: 'on$KgSimulatorCanvas$CreateData',
|
|
356
|
+
id: ID,
|
|
357
|
+
parameter: {
|
|
358
|
+
data: dpj,
|
|
359
|
+
type: NODE_KEY.DPJ,
|
|
360
|
+
},
|
|
361
|
+
});
|
|
362
|
+
|
|
363
|
+
const dpjNode = useDrawHook.$CircularConveyor$drawDPJ({ dpj: dpj });
|
|
364
|
+
if (dpjNode) {
|
|
365
|
+
kgSimulator.get$graph()!.setSelection(dpjNode);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
break;
|
|
369
|
+
}
|
|
370
|
+
//----------------------------------------------------------------------------------------------------
|
|
371
|
+
//endregion
|
|
372
|
+
|
|
373
|
+
//region 传感器
|
|
374
|
+
//----------------------------------------------------------------------------------------------------
|
|
375
|
+
case NODE_KEY.CGQ: {
|
|
376
|
+
const dropUi = kgSimulator.get$graph()!.hitTest(event);
|
|
377
|
+
const dropNode = dropUi?.parent?.data as Q.Node | undefined;
|
|
378
|
+
|
|
379
|
+
if (!dropUi || !dropNode || ![NODE_KEY.SSJ].includes((dropNode.properties as INodeProperty)?.type ?? '')) {
|
|
380
|
+
notification.error({ message: '光电传感器必须拖到某个「普通输送机」或者「移栽机」或者「叠盘机」上面' });
|
|
381
|
+
break;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
const gdcgq = newCGQ({ sceneId: kgSimulator.$Env$CircularConveyor$CurrentScene?.id, stationId: ((dropNode.properties as INodeProperty).data as Station).id, x: dropPoint.x, y: dropPoint.y });
|
|
385
|
+
|
|
386
|
+
emit<IKgSimulator$EventListenerParameter$on$KgSimulatorCanvas$CreateData>({
|
|
387
|
+
event: 'on$KgSimulatorCanvas$CreateData',
|
|
388
|
+
id: ID,
|
|
389
|
+
parameter: {
|
|
390
|
+
data: gdcgq,
|
|
391
|
+
type: NODE_KEY.CGQ,
|
|
392
|
+
},
|
|
393
|
+
});
|
|
394
|
+
|
|
395
|
+
const gdcgqNode = useDrawHook.$CircularConveyor$drawCGQ({ gdcgq: gdcgq });
|
|
396
|
+
if (gdcgqNode) {
|
|
397
|
+
kgSimulator.get$graph()!.setSelection(gdcgqNode);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
break;
|
|
401
|
+
}
|
|
402
|
+
//----------------------------------------------------------------------------------------------------
|
|
403
|
+
//endregion
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
break;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
case kgSimulator.$Config$Env$IsCircularShuttle: {
|
|
410
|
+
// TODO LT 环形穿梭车
|
|
411
|
+
break;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
default: {
|
|
415
|
+
break;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
return false;
|
|
420
|
+
});
|
|
421
|
+
//----------------------------------------------------------------------------------------------------
|
|
422
|
+
//endregion
|
|
423
|
+
|
|
424
|
+
//region 事件: 通过界面交互创建图元
|
|
425
|
+
//----------------------------------------------------------------------------------------------------
|
|
426
|
+
kgCanvas.onElementCreate(async (param) => {
|
|
427
|
+
//region 连线
|
|
428
|
+
//----------------------------------------------------------------------------------------------------
|
|
429
|
+
if (param.element instanceof Q.Edge) {
|
|
430
|
+
const lineWidth = 20;
|
|
431
|
+
|
|
432
|
+
const station01Node = param.element.from;
|
|
433
|
+
const stationNode02 = param.element.to;
|
|
434
|
+
|
|
435
|
+
// 连线长度,
|
|
436
|
+
const length = (() => {
|
|
437
|
+
if (station01Node.x === stationNode02.x) {
|
|
438
|
+
return Math.abs(station01Node.y - stationNode02.y);
|
|
439
|
+
} else {
|
|
440
|
+
return Math.abs(station01Node.x - stationNode02.x);
|
|
441
|
+
}
|
|
442
|
+
})();
|
|
443
|
+
|
|
444
|
+
// 线宽,
|
|
445
|
+
const EDGE_WIDTH = (() => {
|
|
446
|
+
return lineWidth * 2;
|
|
447
|
+
})();
|
|
448
|
+
|
|
449
|
+
// 如果节点之间已经存在连线, 则需要调整连线偏移位置, 避免连线相互遮盖,
|
|
450
|
+
let EDGE_OFFSET = (() => {
|
|
451
|
+
if (station01Node.hasEdgeWith(stationNode02) || stationNode02.hasEdgeWith(station01Node)) {
|
|
452
|
+
if (station01Node.x === stationNode02.x) {
|
|
453
|
+
return { x: EDGE_WIDTH * 6.5, y: 0 };
|
|
454
|
+
} else {
|
|
455
|
+
return { x: 0, y: EDGE_WIDTH * 6.5 };
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
return { x: 0, y: 0 };
|
|
460
|
+
})();
|
|
461
|
+
|
|
462
|
+
//region 图元属性
|
|
463
|
+
//----------------------------------------------------------------------------------------------------
|
|
464
|
+
param.element.name = '';
|
|
465
|
+
param.element.zIndex = 6;
|
|
466
|
+
param.element.putStyles({
|
|
467
|
+
[Q.Styles.ARROW_FROM]: Q.Consts.SHAPE_RECT,
|
|
468
|
+
[Q.Styles.ARROW_FROM_FILL_COLOR]: '#000000',
|
|
469
|
+
[Q.Styles.ARROW_FROM_LINE_CAP]: Q.Consts.LINE_CAP_TYPE_BUTT,
|
|
470
|
+
[Q.Styles.ARROW_FROM_LINE_JOIN]: Q.Consts.LINE_JOIN_TYPE_MITER,
|
|
471
|
+
[Q.Styles.ARROW_FROM_SIZE]: EDGE_WIDTH,
|
|
472
|
+
[Q.Styles.ARROW_FROM_STROKE]: 0,
|
|
473
|
+
[Q.Styles.ARROW_TO]: Q.Consts.SHAPE_TRIANGLE,
|
|
474
|
+
[Q.Styles.ARROW_TO_FILL_COLOR]: '#666666',
|
|
475
|
+
[Q.Styles.ARROW_TO_LINE_CAP]: Q.Consts.LINE_CAP_TYPE_BUTT,
|
|
476
|
+
[Q.Styles.ARROW_TO_LINE_JOIN]: Q.Consts.LINE_JOIN_TYPE_MITER,
|
|
477
|
+
[Q.Styles.ARROW_TO_SIZE]: lineWidth * 20,
|
|
478
|
+
[Q.Styles.ARROW_TO_STROKE]: 0,
|
|
479
|
+
[Q.Styles.EDGE_COLOR]: '#666666',
|
|
480
|
+
[Q.Styles.EDGE_CORNER]: Q.Consts.EDGE_CORNER_NONE,
|
|
481
|
+
[Q.Styles.EDGE_FROM_AT_EDGE]: false,
|
|
482
|
+
[Q.Styles.EDGE_FROM_OFFSET]: EDGE_OFFSET,
|
|
483
|
+
[Q.Styles.EDGE_LINE_DASH]: [length - 100, 100],
|
|
484
|
+
[Q.Styles.EDGE_LINE_DASH_OFFSET]: 0,
|
|
485
|
+
[Q.Styles.EDGE_TO_AT_EDGE]: false,
|
|
486
|
+
[Q.Styles.EDGE_TO_OFFSET]: EDGE_OFFSET,
|
|
487
|
+
[Q.Styles.EDGE_WIDTH]: EDGE_WIDTH,
|
|
488
|
+
[Q.Styles.LINE_CAP]: Q.Consts.LINE_CAP_TYPE_BUTT,
|
|
489
|
+
[Q.Styles.LINE_JOIN]: Q.Consts.LINE_JOIN_TYPE_MITER,
|
|
490
|
+
});
|
|
491
|
+
//----------------------------------------------------------------------------------------------------
|
|
492
|
+
//endregion
|
|
493
|
+
|
|
494
|
+
//region 场景属性
|
|
495
|
+
//----------------------------------------------------------------------------------------------------
|
|
496
|
+
const source = (param.element.from.properties as INodeProperty).data.id;
|
|
497
|
+
const target = (param.element.to.properties as INodeProperty).data.id;
|
|
498
|
+
|
|
499
|
+
const edge = newEdge({
|
|
500
|
+
code: `${source}-${target}`,
|
|
501
|
+
sceneId: kgSimulator.$Env$CircularConveyor$CurrentScene?.id,
|
|
502
|
+
source: source,
|
|
503
|
+
target: target,
|
|
504
|
+
});
|
|
505
|
+
|
|
506
|
+
param.element.properties = { $Edge$length: length, data: { ...edge }, type: NODE_KEY.EDGE } as INodeProperty;
|
|
507
|
+
|
|
508
|
+
kgSimulator.get$graph()!.setSelection(param.element);
|
|
509
|
+
|
|
510
|
+
emit<IKgSimulator$EventListenerParameter$on$KgSimulatorCanvas$CreateData>({
|
|
511
|
+
event: 'on$KgSimulatorCanvas$CreateData',
|
|
512
|
+
id: ID,
|
|
513
|
+
parameter: {
|
|
514
|
+
data: { ...edge },
|
|
515
|
+
type: NODE_KEY.EDGE,
|
|
516
|
+
},
|
|
517
|
+
});
|
|
518
|
+
//----------------------------------------------------------------------------------------------------
|
|
519
|
+
//endregion
|
|
520
|
+
}
|
|
521
|
+
//----------------------------------------------------------------------------------------------------
|
|
522
|
+
//endregion
|
|
523
|
+
|
|
524
|
+
return false;
|
|
525
|
+
});
|
|
526
|
+
//----------------------------------------------------------------------------------------------------
|
|
527
|
+
//endregion
|
|
528
|
+
|
|
529
|
+
//region 事件: 面板--场景--点击一个节点
|
|
530
|
+
//----------------------------------------------------------------------------------------------------
|
|
531
|
+
kgSimulator.on$KgSimulatorPanelScene$Click(async (param) => {
|
|
532
|
+
//region 将点击的节点选中, 并且居中
|
|
533
|
+
//----------------------------------------------------------------------------------------------------
|
|
534
|
+
const element: Q.Node | Q.Edge = kgSimulator.get$graph()!.graphModel.datas.find((i) => (i.properties as INodeProperty).data.id === param.id);
|
|
535
|
+
if (element) {
|
|
536
|
+
// 节点,
|
|
537
|
+
if (element instanceof Q.Node) {
|
|
538
|
+
kgSimulator.get$graph()!.setSelection(element);
|
|
539
|
+
kgSimulator.get$graph()!.centerTo(element.x, element.y);
|
|
540
|
+
}
|
|
541
|
+
// 连线,
|
|
542
|
+
else if (element instanceof Q.Edge) {
|
|
543
|
+
kgSimulator.get$graph()!.setSelection(element);
|
|
544
|
+
kgSimulator.get$graph()!.centerTo((element.from.x + element.to.x) / 2, (element.from.y + element.to.y) / 2);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
//----------------------------------------------------------------------------------------------------
|
|
548
|
+
//endregion
|
|
549
|
+
|
|
550
|
+
return false;
|
|
551
|
+
});
|
|
552
|
+
//----------------------------------------------------------------------------------------------------
|
|
553
|
+
//endregion
|
|
554
|
+
|
|
555
|
+
//region 事件: 面板--场景--勾选发生变更
|
|
556
|
+
//----------------------------------------------------------------------------------------------------
|
|
557
|
+
kgSimulator.on$KgSimulatorPanelScene$SelectChange(async (param) => {
|
|
558
|
+
//region 将勾选的节点选中
|
|
559
|
+
//----------------------------------------------------------------------------------------------------
|
|
560
|
+
const elementList: Array<Q.Node | Q.Edge> = kgSimulator.get$graph()!.graphModel.datas.filter((i) => param.selectedIdList.includes((i.properties as INodeProperty).data.id));
|
|
561
|
+
kgSimulator.get$graph()!.setSelection(elementList);
|
|
562
|
+
//----------------------------------------------------------------------------------------------------
|
|
563
|
+
//endregion
|
|
564
|
+
|
|
565
|
+
return false;
|
|
566
|
+
});
|
|
567
|
+
//----------------------------------------------------------------------------------------------------
|
|
568
|
+
//endregion
|
|
569
|
+
|
|
570
|
+
//region 事件: 面板--场景--删除多个节点
|
|
571
|
+
//----------------------------------------------------------------------------------------------------
|
|
572
|
+
kgSimulator.on$KgSimulatorPanelScene$Delete(async (param) => {
|
|
573
|
+
const elementList: Array<Q.Node> = kgSimulator.get$graph()!.graphModel.datas.filter((i) => param.deleteIdList.includes((i.properties as INodeProperty).data.id));
|
|
574
|
+
for (let element of elementList) {
|
|
575
|
+
kgSimulator.get$graph()!.removeElement(element);
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
return false;
|
|
579
|
+
});
|
|
580
|
+
//----------------------------------------------------------------------------------------------------
|
|
581
|
+
//endregion
|
|
582
|
+
|
|
583
|
+
//region 事件: 面板--属性--属性发生变更
|
|
584
|
+
//----------------------------------------------------------------------------------------------------
|
|
585
|
+
const $KgSimulatorPanelProperty$kgVar$kgForm$onChangeListener = debounce(
|
|
586
|
+
async (param: IKgForm$EventListenerParameter$onChange) => {
|
|
587
|
+
const propertyName = last(param.varName.split('$'))!;
|
|
588
|
+
|
|
589
|
+
// 当前已选中的元素列表,
|
|
590
|
+
const selectedElementList = kgSimulator.get$graph()!.selectionModel?.datas ?? [];
|
|
591
|
+
|
|
592
|
+
for (let element of selectedElementList) {
|
|
593
|
+
const elementProperties = element.properties as INodeProperty;
|
|
594
|
+
|
|
595
|
+
//region 图元属性
|
|
596
|
+
// 这些属性会影响图形的绘制,
|
|
597
|
+
//----------------------------------------------------------------------------------------------------
|
|
598
|
+
switch (param.varName) {
|
|
599
|
+
case 'x': {
|
|
600
|
+
if (element instanceof Q.Node) {
|
|
601
|
+
element.x = param.value;
|
|
602
|
+
}
|
|
603
|
+
break;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
case 'y': {
|
|
607
|
+
if (element instanceof Q.Node) {
|
|
608
|
+
element.y = param.value;
|
|
609
|
+
}
|
|
610
|
+
break;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
case 'width': {
|
|
614
|
+
if (element instanceof Q.Node) {
|
|
615
|
+
element.size = new Q.Size(param.value, element.size.height);
|
|
616
|
+
}
|
|
617
|
+
break;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
case 'length': {
|
|
621
|
+
if (element instanceof Q.Node) {
|
|
622
|
+
element.size = new Q.Size(element.size.width, param.value);
|
|
623
|
+
}
|
|
624
|
+
break;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
//region 编号
|
|
628
|
+
//----------------------------------------------------------------------------------------------------
|
|
629
|
+
case 'code': {
|
|
630
|
+
if (element instanceof Q.Node) {
|
|
631
|
+
const ui: Q.LabelUI = element.bindingUIs.datas.find(
|
|
632
|
+
(i) =>
|
|
633
|
+
i.ui.code === NODE_UI_KEY.CJZ_CODE ||
|
|
634
|
+
i.ui.code === NODE_UI_KEY.XHZ_CODE ||
|
|
635
|
+
i.ui.code === NODE_UI_KEY.SSJ_CODE ||
|
|
636
|
+
i.ui.code === NODE_UI_KEY.YZJ_CODE ||
|
|
637
|
+
i.ui.code === NODE_UI_KEY.DPJ_CODE ||
|
|
638
|
+
i.ui.code === NODE_UI_KEY.CGQ_CODE,
|
|
639
|
+
)?.ui;
|
|
640
|
+
if (ui) {
|
|
641
|
+
ui.data = param.value || $KgSimulatorPanelProperty$kgVar.kgSubmit.formModel.value?.id || 'NULL';
|
|
642
|
+
element.invalidate();
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
break;
|
|
646
|
+
}
|
|
647
|
+
//----------------------------------------------------------------------------------------------------
|
|
648
|
+
//endregion
|
|
649
|
+
|
|
650
|
+
//region 是否主线
|
|
651
|
+
//----------------------------------------------------------------------------------------------------
|
|
652
|
+
case 'isPrimary': {
|
|
653
|
+
if (element instanceof Q.Edge) {
|
|
654
|
+
const lineWidth = 20;
|
|
655
|
+
|
|
656
|
+
// 根据主线支线确定线宽,
|
|
657
|
+
const EDGE_WIDTH = (() => {
|
|
658
|
+
// 主线,
|
|
659
|
+
if (param.value) {
|
|
660
|
+
return lineWidth * 4;
|
|
661
|
+
}
|
|
662
|
+
// 支线,
|
|
663
|
+
else {
|
|
664
|
+
return lineWidth * 2;
|
|
665
|
+
}
|
|
666
|
+
})();
|
|
667
|
+
|
|
668
|
+
element.putStyles({
|
|
669
|
+
[Q.Styles.ARROW_FROM_SIZE]: EDGE_WIDTH,
|
|
670
|
+
[Q.Styles.EDGE_WIDTH]: EDGE_WIDTH,
|
|
671
|
+
});
|
|
672
|
+
element.invalidate();
|
|
673
|
+
}
|
|
674
|
+
break;
|
|
675
|
+
}
|
|
676
|
+
//----------------------------------------------------------------------------------------------------
|
|
677
|
+
//endregion
|
|
678
|
+
}
|
|
679
|
+
//----------------------------------------------------------------------------------------------------
|
|
680
|
+
//endregion
|
|
681
|
+
|
|
682
|
+
//region 图元用户属性
|
|
683
|
+
//----------------------------------------------------------------------------------------------------
|
|
684
|
+
elementProperties.data[propertyName] = param.value;
|
|
685
|
+
//----------------------------------------------------------------------------------------------------
|
|
686
|
+
//endregion
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
return false;
|
|
690
|
+
},
|
|
691
|
+
100,
|
|
692
|
+
{ leading: false, trailing: true },
|
|
693
|
+
);
|
|
694
|
+
$KgSimulatorPanelProperty$kgVar.kgForm.onChange($KgSimulatorPanelProperty$kgVar$kgForm$onChangeListener as any);
|
|
695
|
+
//----------------------------------------------------------------------------------------------------
|
|
696
|
+
//endregion
|
|
697
|
+
|
|
698
|
+
//region 事件: WEBSOCKET--收到消息
|
|
699
|
+
//----------------------------------------------------------------------------------------------------
|
|
700
|
+
kgSimulator.on$WebSocket$Message(async (param) => {
|
|
701
|
+
if (kgSimulator.$Mode$IsSimulate && kgSimulator.$Mode$Simulate$IsRunning) {
|
|
702
|
+
switch (true) {
|
|
703
|
+
//region 环形输送线
|
|
704
|
+
//----------------------------------------------------------------------------------------------------
|
|
705
|
+
case kgSimulator.$Config$Env$IsCircularConveyor: {
|
|
706
|
+
switch (param.data?.type ?? '') {
|
|
707
|
+
//region 创建代理者
|
|
708
|
+
//----------------------------------------------------------------------------------------------------
|
|
709
|
+
case WEBSOCKET_PONG_TYPE.AGENT_CREATED: {
|
|
710
|
+
const sourceStationCode = (param.data as AgentCreatedMessage).sourceStationCode;
|
|
711
|
+
const agent = (param.data as AgentCreatedMessage).data as Agent;
|
|
712
|
+
|
|
713
|
+
// 代理所在站点节点,
|
|
714
|
+
const sourceStationNode = kgSimulator.get$graph()!.graphModel.datas.find((i) => i instanceof Q.Node && ((i.properties as INodeProperty).data as Station).code === sourceStationCode) as Q.Node;
|
|
715
|
+
if (!sourceStationNode) {
|
|
716
|
+
notification.error({ message: `WEBSOCKET | 创建代理者 | 找不到站点「${sourceStationCode}」` });
|
|
717
|
+
____ERROR____(`KgSimulatorCanvas | WEBSOCKET | 创建代理者 | 找不到站点「${sourceStationCode}」`);
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
const sourceStation = (sourceStationNode.properties as INodeProperty).data as Station;
|
|
721
|
+
|
|
722
|
+
// 叠盘机,
|
|
723
|
+
if ((sourceStationNode.properties as INodeProperty).type === NODE_KEY.DPJ) {
|
|
724
|
+
// 从「叠盘机」创建代理者时, 代理者位于叠盘机中心,
|
|
725
|
+
agent.x = sourceStationNode.x;
|
|
726
|
+
agent.y = sourceStationNode.y;
|
|
727
|
+
}
|
|
728
|
+
// 一条出线,
|
|
729
|
+
else if (sourceStationNode.edgeCount === 1 && sourceStationNode.hasOutEdge(true)) {
|
|
730
|
+
sourceStationNode.forEachOutEdge((edge: Q.Edge) => {
|
|
731
|
+
switch (true) {
|
|
732
|
+
// 出线向下,
|
|
733
|
+
case edge.from.x === edge.to.x && edge.from.y < edge.to.y: {
|
|
734
|
+
agent.x = sourceStationNode.x;
|
|
735
|
+
agent.y =
|
|
736
|
+
sourceStationNode.y +
|
|
737
|
+
(sourceStationNode.size.height / 2 - agent.length! / 2) -
|
|
738
|
+
(sourceStation.isLongDistanceSensorOnY
|
|
739
|
+
? kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$LongDistance
|
|
740
|
+
: kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance);
|
|
741
|
+
break;
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
// 两条出线,
|
|
747
|
+
else if (sourceStationNode.edgeCount === 2 && !sourceStationNode.hasInEdge(true) && sourceStationNode.hasOutEdge(true)) {
|
|
748
|
+
sourceStationNode.forEachEdge((edge: Q.Edge) => {
|
|
749
|
+
if (edge.to.edgeCount > 1) {
|
|
750
|
+
switch (true) {
|
|
751
|
+
// 出线向上,
|
|
752
|
+
case edge.from.x === edge.to.x && edge.from.y > edge.to.y: {
|
|
753
|
+
agent.x = sourceStationNode.x;
|
|
754
|
+
agent.y =
|
|
755
|
+
sourceStationNode.y -
|
|
756
|
+
(sourceStationNode.size.height / 2 - agent.length! / 2) +
|
|
757
|
+
(sourceStation.isLongDistanceSensorOnY
|
|
758
|
+
? kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$LongDistance
|
|
759
|
+
: kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance);
|
|
760
|
+
break;
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
});
|
|
765
|
+
}
|
|
766
|
+
// 一条入线, 一条出线,
|
|
767
|
+
else if (sourceStationNode.edgeCount === 2 && sourceStationNode.hasInEdge(true) && sourceStationNode.hasOutEdge(true)) {
|
|
768
|
+
sourceStationNode.forEachInEdge((edge: Q.Edge) => {
|
|
769
|
+
switch (true) {
|
|
770
|
+
// 入线向下,
|
|
771
|
+
case edge.from.x === edge.to.x && edge.from.y < edge.to.y: {
|
|
772
|
+
agent.x = sourceStationNode.x;
|
|
773
|
+
agent.y =
|
|
774
|
+
sourceStationNode.y +
|
|
775
|
+
(sourceStationNode.size.height / 2 - agent.length! / 2) -
|
|
776
|
+
(sourceStation.isLongDistanceSensorOnY
|
|
777
|
+
? kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$LongDistance
|
|
778
|
+
: kgSimulator.$Config$CircularConveyor$DefaultPhotoelectricSensor$ShortDistance);
|
|
779
|
+
break;
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
});
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
emit<IKgSimulator$EventListenerParameter$on$KgSimulatorCanvas$CreateData>({
|
|
786
|
+
event: 'on$KgSimulatorCanvas$CreateData',
|
|
787
|
+
id: ID,
|
|
788
|
+
parameter: {
|
|
789
|
+
data: agent,
|
|
790
|
+
type: NODE_KEY.DLZ,
|
|
791
|
+
},
|
|
792
|
+
});
|
|
793
|
+
|
|
794
|
+
useDrawHook.$CircularConveyor$drawDLZ({ agent: agent });
|
|
795
|
+
|
|
796
|
+
break;
|
|
797
|
+
}
|
|
798
|
+
//----------------------------------------------------------------------------------------------------
|
|
799
|
+
//endregion
|
|
800
|
+
|
|
801
|
+
//region 销毁代理者
|
|
802
|
+
//----------------------------------------------------------------------------------------------------
|
|
803
|
+
case WEBSOCKET_PONG_TYPE.AGENT_DESTROYED: {
|
|
804
|
+
const agent = param.data.data as Agent;
|
|
805
|
+
|
|
806
|
+
// 要删除的代理者节点,
|
|
807
|
+
const agentNode = kgSimulator.get$graph()!.graphModel.datas.find((i) => {
|
|
808
|
+
const agentNodeProperties = i.properties as INodeProperty;
|
|
809
|
+
return agentNodeProperties.type === NODE_KEY.DLZ && (agentNodeProperties.data.id === agent.id || agentNodeProperties.data.code === agent.code || agentNodeProperties.data.code === agent.id);
|
|
810
|
+
}) as Q.Node;
|
|
811
|
+
if (!agentNode) {
|
|
812
|
+
notification.error({ message: `WEBSOCKET | 销毁代理者 | 找不到代理「${agent.id}」` });
|
|
813
|
+
____ERROR____(`KgSimulatorCanvas | WEBSOCKET | 销毁代理者 | 找不到代理「${agent.id}」`);
|
|
814
|
+
break;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
kgSimulator.get$graph()!.removeElement(agentNode);
|
|
818
|
+
|
|
819
|
+
emit<IKgSimulator$EventListenerParameter$on$KgSimulatorCanvas$DeleteData>({
|
|
820
|
+
event: 'on$KgSimulatorCanvas$DeleteData',
|
|
821
|
+
id: ID,
|
|
822
|
+
parameter: {
|
|
823
|
+
data: agent,
|
|
824
|
+
type: NODE_KEY.DLZ,
|
|
825
|
+
},
|
|
826
|
+
});
|
|
827
|
+
|
|
828
|
+
break;
|
|
829
|
+
}
|
|
830
|
+
//----------------------------------------------------------------------------------------------------
|
|
831
|
+
//endregion
|
|
832
|
+
|
|
833
|
+
case WEBSOCKET_PONG_TYPE.AGENT_STATUS_CHANGED: {
|
|
834
|
+
break;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
case WEBSOCKET_PONG_TYPE.AGENT_STATUS_UPDATE_RESPONSE: {
|
|
838
|
+
break;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
//region 代理指令动作
|
|
842
|
+
//----------------------------------------------------------------------------------------------------
|
|
843
|
+
case WEBSOCKET_PONG_TYPE.PLC_ACTION: {
|
|
844
|
+
const message = param.data as PlcActionRequestWebSocketMessage;
|
|
845
|
+
|
|
846
|
+
switch (message.actionType) {
|
|
847
|
+
case 'Move': {
|
|
848
|
+
const agentCode = message.data.deviceId as string | null | undefined;
|
|
849
|
+
// 是否直穿,
|
|
850
|
+
const isThrough = message.data.isThrough as 0 | 1 | null | undefined;
|
|
851
|
+
// 站点二编号,
|
|
852
|
+
const station02Code = message.data.stationId as string | null | undefined;
|
|
853
|
+
// 站点三编号,
|
|
854
|
+
const station03Code = message.data.throughStationCode as string | null | undefined;
|
|
855
|
+
|
|
856
|
+
// 要移动的代理者节点,
|
|
857
|
+
const agentNode: Q.Node = kgSimulator
|
|
858
|
+
.get$graph()!
|
|
859
|
+
.graphModel.datas.find((i) => (i.properties as INodeProperty).type === NODE_KEY.DLZ && ((i.properties as INodeProperty).data as Agent).code === agentCode);
|
|
860
|
+
if (!agentNode) {
|
|
861
|
+
notification.error({ message: `WEBSOCKET | 移动代理者 | 找不到代理「${agentCode}」` });
|
|
862
|
+
____ERROR____(`KgSimulatorCanvas | WEBSOCKET | 移动代理者 | 找不到代理「${agentCode}」`);
|
|
863
|
+
break;
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
// 站点二节点, 站点二节点可能是「输送机」或者「移栽机」或者「叠盘机」,
|
|
867
|
+
const stationNode02: Q.Node = kgSimulator.get$graph()!.graphModel.datas.find((i) => ((i.properties as INodeProperty).data as Station).code === station02Code);
|
|
868
|
+
if (!stationNode02) {
|
|
869
|
+
notification.error({ message: `WEBSOCKET | 移动代理者 | 找不到目的站点「${station02Code}」` });
|
|
870
|
+
____ERROR____(`KgSimulatorCanvas | WEBSOCKET | 移动代理者 | 找不到目的站点「${station02Code}」`);
|
|
871
|
+
break;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
const agentNodeProperties = agentNode.properties as INodeProperty;
|
|
875
|
+
const station01Code = agentNodeProperties.$Agent$Move$station01Code;
|
|
876
|
+
|
|
877
|
+
// 站点一节点, 站点一节点可能是「输送机」或者「移栽机」或者「叠盘机」,
|
|
878
|
+
const station01Node: Q.Node = kgSimulator.get$graph()!.graphModel.datas.find((i) => ((i.properties as INodeProperty).data as Station).code === station01Code);
|
|
879
|
+
if (!station01Node) {
|
|
880
|
+
notification.error({ message: `WEBSOCKET | 移动代理者 | 找不到起始节点「${station01Code}」` });
|
|
881
|
+
____ERROR____(`KgSimulatorCanvas | WEBSOCKET | 移动代理者 | 找不到起始节点「${station01Code}」`);
|
|
882
|
+
break;
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
const agent = agentNodeProperties.data as Agent;
|
|
886
|
+
|
|
887
|
+
// 正在移动,
|
|
888
|
+
if (agentNodeProperties.$Agent$Move$IsMoveDoing) {
|
|
889
|
+
notification.error({ message: `WEBSOCKET | 移动代理者 | 代理「${agentCode}」正在移动到「${agentNodeProperties.$Agent$Move$station02Code}」, 无法开始新的移动到「${station02Code}」` });
|
|
890
|
+
// prettier-ignore
|
|
891
|
+
____ERROR____(`KgSimulatorCanvas | WEBSOCKET | 移动代理者 | 代理「${agentCode}」正在移动到「${agentNodeProperties.$Agent$Move$station02Code}」, 无法开始新的移动到「${station02Code}」`);
|
|
892
|
+
break;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
const stationNode02Properties = stationNode02.properties as INodeProperty;
|
|
896
|
+
|
|
897
|
+
// 代理者已经在目的站点,
|
|
898
|
+
if (agentNodeProperties.$Agent$Move$station01Code === station02Code) {
|
|
899
|
+
// 目的站点就是「叠盘机」,
|
|
900
|
+
if (stationNode02Properties.type === NODE_KEY.DPJ) {
|
|
901
|
+
// 将从「输送机」到「叠盘机」,
|
|
902
|
+
if (stationNode02Properties.$DPJ$CurrentAgentId !== agent.id) {
|
|
903
|
+
// N/A
|
|
904
|
+
}
|
|
905
|
+
// 已从「输送机」到「叠盘机」,
|
|
906
|
+
else {
|
|
907
|
+
notification.error({ message: `WEBSOCKET | 移动代理者 | 代理「${agentCode}」已在目的站点「${station02Code}」` });
|
|
908
|
+
____ERROR____(`KgSimulatorCanvas | WEBSOCKET | 移动代理者 | 代理「${agentCode}」已在目的站点「${station02Code}」`);
|
|
909
|
+
break;
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
// 目的站点不是「叠盘机」,
|
|
913
|
+
else {
|
|
914
|
+
const dpjNode = kgSimulator
|
|
915
|
+
.get$graph()!
|
|
916
|
+
.graphModel.datas.find(
|
|
917
|
+
(i) =>
|
|
918
|
+
i.x === station01Node.x &&
|
|
919
|
+
i.y === station01Node.y &&
|
|
920
|
+
(i.properties as INodeProperty).type === NODE_KEY.DPJ &&
|
|
921
|
+
(i.properties as INodeProperty).data.id !== stationNode02Properties.data.id &&
|
|
922
|
+
(i.properties as INodeProperty).data.id !== agent.id,
|
|
923
|
+
);
|
|
924
|
+
if (dpjNode) {
|
|
925
|
+
// 将从「叠盘机」到「输送机」,
|
|
926
|
+
if ((dpjNode.properties as INodeProperty).$DPJ$CurrentAgentId === agent.id) {
|
|
927
|
+
// N/A
|
|
928
|
+
}
|
|
929
|
+
// 已从「叠盘机」到「输送机」,
|
|
930
|
+
else {
|
|
931
|
+
notification.error({ message: `WEBSOCKET | 移动代理者 | 代理「${agentCode}」已在目的站点「${station02Code}」` });
|
|
932
|
+
____ERROR____(`KgSimulatorCanvas | WEBSOCKET | 移动代理者 | 代理「${agentCode}」已在目的站点「${station02Code}」`);
|
|
933
|
+
break;
|
|
934
|
+
}
|
|
935
|
+
} else {
|
|
936
|
+
notification.error({ message: `坐标「${stationNode02.x}, ${stationNode02.y}」上存在多个站点, 请确认数据是否有误` });
|
|
937
|
+
____ERROR____(`坐标「${stationNode02.x}, ${stationNode02.y}」上存在多个站点, 请确认数据是否有误`);
|
|
938
|
+
break;
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
agentNodeProperties.$Agent$Move$Direction = (() => {
|
|
944
|
+
//region 叠盘拆盘
|
|
945
|
+
//----------------------------------------------------------------------------------------------------
|
|
946
|
+
// 目的站点就是「叠盘机」,
|
|
947
|
+
if (stationNode02Properties.type === NODE_KEY.DPJ) {
|
|
948
|
+
// 将从「输送机」到「叠盘机」,
|
|
949
|
+
if (stationNode02Properties.$DPJ$CurrentAgentId !== agent.id) {
|
|
950
|
+
return 'DPJ';
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
// 目的站点不是「叠盘机」,
|
|
954
|
+
else {
|
|
955
|
+
const dpjNode = kgSimulator
|
|
956
|
+
.get$graph()!
|
|
957
|
+
.graphModel.datas.find(
|
|
958
|
+
(i) =>
|
|
959
|
+
i.x === station01Node.x &&
|
|
960
|
+
i.y === station01Node.y &&
|
|
961
|
+
(i.properties as INodeProperty).type === NODE_KEY.DPJ &&
|
|
962
|
+
(i.properties as INodeProperty).data.id !== stationNode02Properties.data.id &&
|
|
963
|
+
(i.properties as INodeProperty).data.id !== agent.id,
|
|
964
|
+
);
|
|
965
|
+
if (dpjNode) {
|
|
966
|
+
// 将从「叠盘机」到「输送机」,
|
|
967
|
+
if ((dpjNode.properties as INodeProperty).$DPJ$CurrentAgentId === agent.id || (dpjNode.x === station01Node.x && dpjNode.y === station01Node.y)) {
|
|
968
|
+
return 'DPJ';
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
//----------------------------------------------------------------------------------------------------
|
|
973
|
+
//endregion
|
|
974
|
+
|
|
975
|
+
switch (true) {
|
|
976
|
+
// 向上
|
|
977
|
+
case station01Node.x === stationNode02.x && station01Node.y > stationNode02.y: {
|
|
978
|
+
return 'UP';
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
// 向下
|
|
982
|
+
case station01Node.x === stationNode02.x && station01Node.y < stationNode02.y: {
|
|
983
|
+
return 'DOWN';
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
// 向左
|
|
987
|
+
case station01Node.y === stationNode02.y && station01Node.x > stationNode02.x: {
|
|
988
|
+
return 'LEFT';
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
// 向右
|
|
992
|
+
case station01Node.y === stationNode02.y && station01Node.x < stationNode02.x: {
|
|
993
|
+
return 'RIGHT';
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
default: {
|
|
997
|
+
notification.error({ message: `WEBSOCKET | 移动代理者 | 代理「${agentCode}」到「${stationNode02Properties.data.code}」无法确定移动方向, 请确认数据是否有误` });
|
|
998
|
+
____ERROR____(`KgSimulatorCanvas | WEBSOCKET | 移动代理者 | 代理「${agentCode}」到「${stationNode02Properties.data.code}」无法确定移动方向, 请确认数据是否有误`);
|
|
999
|
+
return undefined;
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
})();
|
|
1003
|
+
|
|
1004
|
+
if (agentNodeProperties.$Agent$Move$Direction) {
|
|
1005
|
+
if (isThrough === 1 && !station03Code) {
|
|
1006
|
+
notification.error({ message: `WEBSOCKET | 移动代理者 | 代理「${agentCode}」到「${stationNode02Properties.data.code}」直穿模式必须指定下一站点编号` });
|
|
1007
|
+
____ERROR____(`KgSimulatorCanvas | WEBSOCKET | 移动代理者 | 代理「${agentCode}」到「${stationNode02Properties.data.code}」直穿模式必须指定下一站点编号`);
|
|
1008
|
+
} else {
|
|
1009
|
+
agentNodeProperties.$Agent$Move$PreviousMoveTime = Date.now();
|
|
1010
|
+
agentNodeProperties.$Agent$Move$IsMoveDoing = true;
|
|
1011
|
+
agentNodeProperties.$Agent$Move$IsThrough = isThrough === 1;
|
|
1012
|
+
agentNodeProperties.$Agent$Move$station02Code = station02Code;
|
|
1013
|
+
agentNodeProperties.$Agent$Move$station03Code = isThrough === 1 ? station03Code : '';
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
// 如果无法确定移动方向, 则不执行移动,
|
|
1017
|
+
else {
|
|
1018
|
+
// N/A
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
break;
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
break;
|
|
1026
|
+
}
|
|
1027
|
+
//----------------------------------------------------------------------------------------------------
|
|
1028
|
+
//endregion
|
|
1029
|
+
|
|
1030
|
+
case WEBSOCKET_PONG_TYPE.SIMULATION_STATUS_CHANGED: {
|
|
1031
|
+
break;
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
break;
|
|
1036
|
+
}
|
|
1037
|
+
//----------------------------------------------------------------------------------------------------
|
|
1038
|
+
//endregion
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
return false;
|
|
1043
|
+
});
|
|
1044
|
+
//----------------------------------------------------------------------------------------------------
|
|
1045
|
+
//endregion
|
|
1046
|
+
|
|
1047
|
+
//region DATA
|
|
1048
|
+
// ----------------------------------------------------------------------------------------------------
|
|
1049
|
+
/**
|
|
1050
|
+
* 防止浏览器对定时器节流.
|
|
1051
|
+
*/
|
|
1052
|
+
let audioContext: AudioContext | null = null;
|
|
1053
|
+
let oscillatorNode: OscillatorNode | null = null;
|
|
1054
|
+
// ----------------------------------------------------------------------------------------------------
|
|
1055
|
+
//endregion
|
|
1056
|
+
|
|
1057
|
+
//region WATCH
|
|
1058
|
+
// ----------------------------------------------------------------------------------------------------
|
|
1059
|
+
// ----------------------------------------------------------------------------------------------------
|
|
1060
|
+
//endregion
|
|
1061
|
+
|
|
1062
|
+
//region FUNCTION
|
|
1063
|
+
// ----------------------------------------------------------------------------------------------------
|
|
1064
|
+
// ----------------------------------------------------------------------------------------------------
|
|
1065
|
+
//endregion
|
|
1066
|
+
|
|
1067
|
+
//region LIFECYCLE
|
|
1068
|
+
//----------------------------------------------------------------------------------------------------
|
|
1069
|
+
onMounted(() => {
|
|
1070
|
+
//region 防止浏览器对定时器节流
|
|
1071
|
+
//----------------------------------------------------------------------------------------------------
|
|
1072
|
+
audioContext = new AudioContext();
|
|
1073
|
+
oscillatorNode = audioContext.createOscillator();
|
|
1074
|
+
oscillatorNode.frequency.value = 0.01;
|
|
1075
|
+
oscillatorNode.connect(audioContext.destination);
|
|
1076
|
+
oscillatorNode.start();
|
|
1077
|
+
|
|
1078
|
+
document.addEventListener('click', () => {
|
|
1079
|
+
try {
|
|
1080
|
+
audioContext?.resume();
|
|
1081
|
+
} catch (e) {
|
|
1082
|
+
____ERROR____(`KgSimulatorCanvas | ${(e as any)?.message}`);
|
|
1083
|
+
}
|
|
1084
|
+
});
|
|
1085
|
+
//----------------------------------------------------------------------------------------------------
|
|
1086
|
+
//endregion
|
|
1087
|
+
});
|
|
1088
|
+
|
|
1089
|
+
onUnmounted(() => {
|
|
1090
|
+
oscillatorNode?.stop();
|
|
1091
|
+
audioContext?.close();
|
|
1092
|
+
});
|
|
1093
|
+
//----------------------------------------------------------------------------------------------------
|
|
1094
|
+
//endregion
|
|
1095
|
+
|
|
1096
|
+
return () => (
|
|
1097
|
+
<KgCanvas
|
|
1098
|
+
id={kgSimulator.$KgCanvas$id}
|
|
1099
|
+
kgIsGridBackground={false}
|
|
1100
|
+
kg$ContextMenu$Reload$IsAvailable={kgSimulator.$Mode$IsEdit || kgSimulator.$Mode$IsMonitor}
|
|
1101
|
+
kg$KgCanvasToolbarButtonMode$IsAvailable={kgSimulator.$Mode$IsEdit}
|
|
1102
|
+
></KgCanvas>
|
|
1103
|
+
);
|
|
1104
|
+
},
|
|
1105
|
+
});
|