@kengic/vue 0.30.1-beta.96 → 0.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +503 -0
- package/README.md +10 -0
- package/bin/bin.mjs +9 -24
- package/bin/postinstall.mjs +24 -4
- package/dist/aim-outlined.8d38a0f9.mjs +8 -0
- package/dist/align-left-outlined.579b01c6.mjs +8 -0
- package/dist/audit-outlined.4555f723.mjs +8 -0
- package/dist/bubble-loading.cd2fe007.mjs +8 -0
- package/dist/bulb-outlined.a5bf22d8.mjs +8 -0
- package/dist/card-text-outline.6e053122.mjs +8 -0
- package/dist/caret-down-outlined.c0564a3f.mjs +8 -0
- package/dist/caret-left-outlined.35b1d7d1.mjs +8 -0
- package/dist/caret-right-filled.dbbda237.mjs +8 -0
- package/dist/caret-right-outlined-Btgsw6a_.7ce8e8fe.mjs +8 -0
- package/dist/caret-right-outlined.12fe6699.mjs +8 -0
- package/dist/caret-up-outlined.81b559ad.mjs +8 -0
- package/dist/check-box-outline-blank.d01a2055.mjs +8 -0
- package/dist/check-circle-outlined.b219949f.mjs +8 -0
- package/dist/check-outlined.59c42074.mjs +8 -0
- package/dist/check-square-outlined.233589d8.mjs +8 -0
- package/dist/checkbox-indeterminate.e5386a53.mjs +8 -0
- package/dist/clock-circle-outline.b9d0b3dc.mjs +8 -0
- package/dist/close-circle-outlined.85f75690.mjs +8 -0
- package/dist/close-outlined-DMcSQWxQ.ce961fd1.mjs +8 -0
- package/dist/close-outlined.5757472a.mjs +8 -0
- package/dist/collapse-all-rounded.26ee73fc.mjs +8 -0
- package/dist/control-outlined.d66ac4d2.mjs +8 -0
- package/dist/copy-filled.a3dcd299.mjs +8 -0
- package/dist/copy-outlined.6a695d8a.mjs +8 -0
- package/dist/delete-outlined.20afb717.mjs +8 -0
- package/dist/delete-twotone.1d40696a.mjs +8 -0
- package/dist/double-right-outlined.f057a6b2.mjs +8 -0
- package/dist/down-circle-outlined.8ba93393.mjs +8 -0
- package/dist/download-outlined.e78b5364.mjs +8 -0
- package/dist/edit-outlined.0aae2217.mjs +8 -0
- package/dist/edit-twotone.67c952fa.mjs +8 -0
- package/dist/email-resend-outline.780506de.mjs +8 -0
- package/dist/exception-outlined.8c0003a2.mjs +8 -0
- package/dist/exclamation-circle-outlined-DZrXCnvM.07559897.mjs +8 -0
- package/dist/expand-all-rounded.e01e6cb9.mjs +8 -0
- package/dist/eye-invisible-outlined.5f8d6151.mjs +8 -0
- package/dist/eye-outlined.b25b4d28.mjs +8 -0
- package/dist/file-text-outline.2fbccab6.mjs +8 -0
- package/dist/fit-screen-outline.7341560f.mjs +8 -0
- package/dist/fullscreen-exit-outlined-X1iYkFc4.d7884311.mjs +8 -0
- package/dist/fullscreen-exit-outlined.b77fa876.mjs +8 -0
- package/dist/fullscreen-outlined-DDBrsRcy.d174b06a.mjs +8 -0
- package/dist/fullscreen-outlined.cd572ef8.mjs +8 -0
- package/dist/holder-outlined.9e698750.mjs +8 -0
- package/dist/index.css +1 -0
- package/dist/info-circle-outlined.7ddbd554.mjs +8 -0
- package/dist/kengic-vue.js +224279 -0
- package/dist/key-return-thin.ce6f074c.mjs +8 -0
- package/dist/loading-outlined.13a15197.mjs +8 -0
- package/dist/more-outlined.8e1202ac.mjs +8 -0
- package/dist/one-to-one-outlined.ac265beb.mjs +8 -0
- package/dist/palette-swatch-variant.f7258843.mjs +8 -0
- package/dist/partition-outlined.1bcf4f37.mjs +8 -0
- package/dist/pause-circle-outlined.cd534f5f.mjs +8 -0
- package/dist/pause-outlined.fca0d0f9.mjs +8 -0
- package/dist/pause-rounded.1ed7cc39.mjs +8 -0
- package/dist/play-arrow-rounded.90fc4173.mjs +8 -0
- package/dist/plus-outlined.bdaa6481.mjs +8 -0
- package/dist/printer-outlined.a8d0d92b.mjs +8 -0
- package/dist/profile-outlined.1059fb0d.mjs +8 -0
- package/dist/project/build/generate/generateModifyVars.ts +39 -0
- package/dist/project/index.ts +1 -0
- package/dist/project/types/global.d.ts +184 -0
- package/dist/release-gate-check.8c1ba629.mjs +8 -0
- package/dist/reload-outlined.d320578b.mjs +8 -0
- package/dist/retweet-outlined.bfa9b123.mjs +8 -0
- package/dist/save-as-outline-rounded.c65d61b2.mjs +8 -0
- package/dist/save-outline-rounded.c9c3f880.mjs +8 -0
- package/dist/search-outlined-Od1M_oxf.4a68e7e4.mjs +8 -0
- package/dist/search-outlined.ba5c5a3f.mjs +8 -0
- package/dist/setting-outlined.a3caf743.mjs +8 -0
- package/dist/src/api/WMS/Controllers/DescriptionController/List.d.ts +51 -0
- package/dist/src/api/WMS/Controllers/DescriptionController/ListByCodeNamesAndCodeValues.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/DescriptionController/index.d.ts +2 -0
- package/dist/src/api/WMS/Controllers/SqlClientController/Execute.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/SqlClientController/ExecutePage.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/SqlClientController/index.d.ts +2 -0
- package/dist/src/api/WMS/Controllers/SysPermissionController/List.d.ts +73 -0
- package/dist/src/api/WMS/Controllers/SysPermissionController/index.d.ts +1 -0
- package/dist/src/api/WMS/Controllers/VarConfigDescriptionController/Add.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarConfigDescriptionController/ListByFormId.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarConfigPossibilityController/ExecuteQuery.d.ts +18 -0
- package/dist/src/api/WMS/Controllers/VarConfigPossibilityController/index.d.ts +1 -0
- package/dist/src/api/WMS/Controllers/VarController/GetAll.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarController/index.d.ts +1 -0
- package/dist/src/api/WMS/Controllers/VarDdaController/Create.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarDdaController/GetResultSetMetadataFromSql.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarDdaController/ValidateCopySql.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarDdaController/ValidateCreateSql.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarDdaController/ValidateDeleteSql.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarDdaController/ValidateFrmId.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarDdaController/ValidateSearchSql.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarDdaController/ValidateUpdateSql.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarDdaController/ValidateVarButtonVarName.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarDdaController/index.d.ts +9 -0
- package/dist/src/api/WMS/Controllers/VarGridMasterController/QueryByID.d.ts +19 -0
- package/dist/src/api/WMS/Controllers/VarGridMasterController/Update.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarGridMasterController/index.d.ts +2 -0
- package/dist/src/api/WMS/Controllers/VarProfileMasterController/QueryByID.d.ts +19 -0
- package/dist/src/api/WMS/Controllers/VarProfileMasterController/index.d.ts +1 -0
- package/dist/src/api/WMS/Controllers/VarVariableController/Delete.d.ts +16 -0
- package/dist/src/api/WMS/Controllers/VarVariableController/index.d.ts +1 -0
- package/dist/src/api/WMS/Controllers/WarehouseController/ListVO.d.ts +25 -0
- package/dist/src/api/WMS/Controllers/WorkstationController/List.d.ts +25 -0
- package/dist/src/api/WMS/Controllers/WorkstationController/index.d.ts +1 -0
- package/dist/src/api/WMS/index.d.ts +2 -0
- package/dist/src/api/WMS/models.d.ts +1128 -0
- package/dist/src/api/api.d.ts +1 -0
- package/dist/src/api/def.d.ts +1 -0
- package/dist/src/api/index.d.ts +2 -0
- package/dist/src/component/KgAppSelect/KgAppSelect.d.ts +46 -0
- package/dist/src/component/KgAppSelect/KgAppSelect.event.d.ts +31 -0
- package/dist/src/component/KgAppSelect/KgAppSelect.hooks.d.ts +18 -0
- package/dist/src/component/KgAppSelect/KgAppSelect.store.d.ts +33 -0
- package/dist/src/component/KgAppSelect/index.d.ts +3 -0
- package/dist/src/component/KgButton/KgButton.Copy.d.ts +40 -0
- package/dist/src/component/KgButton/KgButton.Create.d.ts +40 -0
- package/dist/src/component/KgButton/KgButton.Delete.d.ts +40 -0
- package/dist/src/component/KgButton/KgButton.Export.d.ts +40 -0
- package/dist/src/component/KgButton/KgButton.Import.d.ts +40 -0
- package/dist/src/component/KgButton/KgButton.ImportTemplate.d.ts +40 -0
- package/dist/src/component/KgButton/KgButton.Item.d.ts +39 -0
- package/dist/src/component/KgButton/KgButton.Other.d.ts +40 -0
- package/dist/src/component/KgButton/KgButton.Search.d.ts +40 -0
- package/dist/src/component/KgButton/KgButton.Update.d.ts +40 -0
- package/dist/src/component/KgButton/KgButton.d.ts +39 -0
- package/dist/src/component/KgButton/KgButton.event.d.ts +81 -0
- package/dist/src/component/KgButton/KgButton.hooks.d.ts +67 -0
- package/dist/src/component/KgButton/KgButton.model.d.ts +31 -0
- package/dist/src/component/KgButton/KgButton.store.d.ts +92 -0
- package/dist/src/component/KgCanvas/KgCanvas.ContextMenu.d.ts +100 -0
- package/dist/src/component/KgCanvas/KgCanvas.ToolbarButton.Fullscreen.d.ts +37 -0
- package/dist/src/component/KgCanvas/KgCanvas.ToolbarButton.Mode.d.ts +7 -0
- package/dist/src/component/KgCanvas/KgCanvas.ToolbarButton.OverviewScale.d.ts +37 -0
- package/dist/src/component/KgCanvas/KgCanvas.Tooltip.d.ts +27 -0
- package/dist/src/component/KgCanvas/KgCanvas.d.ts +232 -0
- package/dist/src/component/KgCanvas/KgCanvas.event.d.ts +216 -0
- package/dist/src/component/KgCanvas/KgCanvas.hooks.d.ts +100 -0
- package/dist/src/component/KgCanvas/KgCanvas.model.d.ts +27 -0
- package/dist/src/component/KgCanvas/KgCanvas.service.d.ts +17 -0
- package/dist/src/component/KgCanvas/KgCanvas.store.d.ts +9 -0
- package/dist/src/component/KgCanvas/index.d.ts +4 -0
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.AreaSelect.d.ts +5 -0
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Canvas.d.ts +5 -0
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Canvas.service.d.ts +63 -0
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Legend.d.ts +5 -0
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Offline.d.ts +5 -0
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Setting.d.ts +5 -0
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Tab.Log.d.ts +5 -0
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Tab.Rgv.d.ts +33 -0
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.d.ts +5 -0
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.hooks.d.ts +29 -0
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.model.d.ts +127 -0
- package/dist/src/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.store.d.ts +354 -0
- package/dist/src/component/KgCircularShuttleMonitor/index.d.ts +3 -0
- package/dist/src/component/KgForm/KgForm.d.ts +413 -0
- package/dist/src/component/KgForm/KgForm.event.d.ts +202 -0
- package/dist/src/component/KgForm/KgForm.hooks.d.ts +92 -0
- package/dist/src/component/KgForm/KgForm.store.d.ts +23 -0
- package/dist/src/component/KgForm/index.d.ts +4 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.Addon.DynamicQueryOperator.d.ts +49 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.Addon.Lookup.Modal.d.ts +16 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.Addon.Lookup.d.ts +31 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.Checkbox.d.ts +98 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.CheckboxGroup.d.ts +95 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.Date.d.ts +95 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.DateRange.d.ts +95 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.Image.d.ts +90 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.Input.d.ts +94 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.InputNumber.d.ts +94 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.InputPassword.d.ts +94 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.Link.d.ts +93 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.RadioGroup.d.ts +96 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.Select.d.ts +95 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.Select.service.d.ts +28 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.Switch.d.ts +94 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.TextArea.d.ts +94 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.d.ts +95 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.model.d.ts +111 -0
- package/dist/src/component/KgForm.Item/KgForm.Item.service.d.ts +17 -0
- package/dist/src/component/KgImage/KgImage.d.ts +100 -0
- package/dist/src/component/KgLayoutHeader/KgLayoutHeader.Locale.d.ts +38 -0
- package/dist/src/component/KgLayoutHeader/KgLayoutHeader.hooks.d.ts +4 -0
- package/dist/src/component/KgLayoutHeader/index.d.ts +2 -0
- package/dist/src/component/KgModal/KgModal.d.ts +817 -0
- package/dist/src/component/KgModal/KgModal.model.d.ts +8 -0
- package/dist/src/component/KgModal/KgModal.service.d.ts +37 -0
- package/dist/src/component/KgModal/KgModalHeaderButtons.d.ts +92 -0
- package/dist/src/component/KgModal02/KgModal02.d.ts +470 -0
- package/dist/src/component/KgModal02/KgModal02.model.d.ts +1 -0
- package/dist/src/component/KgProgressA/KgProgressA.d.ts +85 -0
- package/dist/src/component/KgResizable/KgResizable.d.ts +119 -0
- package/dist/src/component/KgResizable/KgResizable.service.d.ts +12 -0
- package/dist/src/component/KgSearch/KgSearch.d.ts +26 -0
- package/dist/src/component/KgSearch/KgSearch.event.d.ts +31 -0
- package/dist/src/component/KgSearch/KgSearch.hooks.d.ts +72 -0
- package/dist/src/component/KgSearch/KgSearch.service.d.ts +32 -0
- package/dist/src/component/KgSearch/KgSearch.store.d.ts +103 -0
- package/dist/src/component/KgSearch/index.d.ts +3 -0
- package/dist/src/component/KgSimulator/KgSimulator.Canvas.Title.d.ts +11 -0
- package/dist/src/component/KgSimulator/KgSimulator.Canvas.d.ts +11 -0
- package/dist/src/component/KgSimulator/KgSimulator.Canvas.service.d.ts +80 -0
- package/dist/src/component/KgSimulator/KgSimulator.Menu.Scene.Create.CircularConveyor.d.ts +36 -0
- package/dist/src/component/KgSimulator/KgSimulator.Menu.Scene.Open.CircularConveyor.d.ts +36 -0
- package/dist/src/component/KgSimulator/KgSimulator.Menu.d.ts +4 -0
- package/dist/src/component/KgSimulator/KgSimulator.Panel.Prefab.d.ts +4 -0
- package/dist/src/component/KgSimulator/KgSimulator.Panel.Property.d.ts +4 -0
- package/dist/src/component/KgSimulator/KgSimulator.Panel.Scene.d.ts +4 -0
- package/dist/src/component/KgSimulator/KgSimulator.Panel.d.ts +97 -0
- package/dist/src/component/KgSimulator/KgSimulator.Prefab.d.ts +108 -0
- package/dist/src/component/KgSimulator/KgSimulator.ToolbarButton.Prefab.d.ts +9 -0
- package/dist/src/component/KgSimulator/KgSimulator.ToolbarButton.Property.d.ts +9 -0
- package/dist/src/component/KgSimulator/KgSimulator.ToolbarButton.Scene.d.ts +9 -0
- package/dist/src/component/KgSimulator/KgSimulator.ToolbarButton.d.ts +113 -0
- package/dist/src/component/KgSimulator/KgSimulator.d.ts +33 -0
- package/dist/src/component/KgSimulator/KgSimulator.event.d.ts +93 -0
- package/dist/src/component/KgSimulator/KgSimulator.hooks.d.ts +103 -0
- package/dist/src/component/KgSimulator/KgSimulator.icons.d.ts +10 -0
- package/dist/src/component/KgSimulator/KgSimulator.model.d.ts +1502 -0
- package/dist/src/component/KgSimulator/KgSimulator.store.d.ts +474 -0
- package/dist/src/component/KgSimulator/KgSimulator.utils.d.ts +21 -0
- package/dist/src/component/KgSimulator/index.d.ts +3 -0
- package/dist/src/component/KgSubmit/KgSubmit.d.ts +21 -0
- package/dist/src/component/KgSubmit/KgSubmit.event.d.ts +135 -0
- package/dist/src/component/KgSubmit/KgSubmit.hooks.d.ts +358 -0
- package/dist/src/component/KgSubmit/KgSubmit.model.d.ts +57 -0
- package/dist/src/component/KgSubmit/KgSubmit.service.d.ts +29 -0
- package/dist/src/component/KgSubmit/KgSubmit.store.d.ts +112 -0
- package/dist/src/component/KgSubmit/index.d.ts +4 -0
- package/dist/src/component/KgTable/KgTable.BodyCell.d.ts +60 -0
- package/dist/src/component/KgTable/KgTable.HeadCell.d.ts +51 -0
- package/dist/src/component/KgTable/KgTable.Info.d.ts +57 -0
- package/dist/src/component/KgTable/KgTable.Setting.VarGridMaster.SaveAs.d.ts +4 -0
- package/dist/src/component/KgTable/KgTable.Setting.d.ts +20 -0
- package/dist/src/component/KgTable/KgTable.Setting.service.d.ts +22 -0
- package/dist/src/component/KgTable/KgTable.d.ts +39 -0
- package/dist/src/component/KgTable/KgTable.event.d.ts +111 -0
- package/dist/src/component/KgTable/KgTable.hooks.d.ts +135 -0
- package/dist/src/component/KgTable/KgTable.model.d.ts +65 -0
- package/dist/src/component/KgTable/KgTable.service.d.ts +34 -0
- package/dist/src/component/KgTable/KgTable.store.d.ts +91 -0
- package/dist/src/component/KgTable/index.d.ts +4 -0
- package/dist/src/component/KgTable02/KgTable02.BodyCell.d.ts +72 -0
- package/dist/src/component/KgTable02/KgTable02.d.ts +46 -0
- package/dist/src/component/KgTable02/KgTable02.event.d.ts +123 -0
- package/dist/src/component/KgTable02/KgTable02.hooks.d.ts +62 -0
- package/dist/src/component/KgTable02/KgTable02.store.d.ts +62 -0
- package/dist/src/component/KgTable02/index.d.ts +4 -0
- package/dist/src/component/KgVar/KgVar.Factory.d.ts +106 -0
- package/dist/src/component/KgVar/KgVar.d.ts +120 -0
- package/dist/src/component/KgVar/KgVar.event.d.ts +75 -0
- package/dist/src/component/KgVar/KgVar.hooks.d.ts +307 -0
- package/dist/src/component/KgVar/KgVar.model.d.ts +70 -0
- package/dist/src/component/KgVar/KgVar.store.d.ts +269 -0
- package/dist/src/component/KgVar/index.d.ts +5 -0
- package/dist/src/component/KgVarConfig/KgVarConfig.d.ts +3 -0
- package/dist/src/component/KgVarConfig/KgVarConfig.hooks.d.ts +3 -0
- package/dist/src/component/KgVarConfig/KgVarConfig.model.d.ts +42 -0
- package/dist/src/component/KgVarConfig/KgVarConfig.store.d.ts +16 -0
- package/dist/src/component/KgVarConfig/components/KgVarConfig.SelectFormIdModal.d.ts +27 -0
- package/dist/src/component/KgVarConfig/components/KgVarConfigModal.d.ts +53 -0
- package/dist/src/component/KgVarConfig/components/button/KgVarConfig.Modal.Button.VarButton.d.ts +7 -0
- package/dist/src/component/KgVarConfig/components/button/KgVarConfig.Modal.Button.VarButtonConfig.d.ts +7 -0
- package/dist/src/component/KgVarConfig/components/button/KgVarConfig.Modal.Button.d.ts +5 -0
- package/dist/src/component/KgVarConfig/components/child/KgVarConfig.Modal.Child.d.ts +7 -0
- package/dist/src/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.VarProfileConfig.d.ts +7 -0
- package/dist/src/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.VarProfileMaster.d.ts +7 -0
- package/dist/src/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.VarProfileMaster.service.d.ts +17 -0
- package/dist/src/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.d.ts +5 -0
- package/dist/src/component/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.VarSubmitConfig.d.ts +7 -0
- package/dist/src/component/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.VarSubmitDetail.d.ts +7 -0
- package/dist/src/component/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.d.ts +5 -0
- package/dist/src/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.VarGridConfig.d.ts +7 -0
- package/dist/src/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.VarGridMaster.d.ts +7 -0
- package/dist/src/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.VarGridMaster.service.d.ts +23 -0
- package/dist/src/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.d.ts +5 -0
- package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigControl.d.ts +2 -0
- package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigDescription.d.ts +2 -0
- package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigInput.d.ts +2 -0
- package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigLookup.d.ts +2 -0
- package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigPossibility.d.ts +2 -0
- package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigTip.d.ts +2 -0
- package/dist/src/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarVariable.d.ts +2 -0
- package/dist/src/component/KgVarConfig/index.d.ts +3 -0
- package/dist/src/component/KgWarehouse/KgWarehouse.d.ts +50 -0
- package/dist/src/component/KgWarehouse/KgWarehouse.event.d.ts +30 -0
- package/dist/src/component/KgWarehouse/KgWarehouse.guard.d.ts +8 -0
- package/dist/src/component/KgWarehouse/KgWarehouse.hooks.d.ts +41 -0
- package/dist/src/component/KgWarehouse/KgWarehouse.store.d.ts +27 -0
- package/dist/src/component/KgWarehouse/index.d.ts +4 -0
- package/dist/src/component/KgWorkStation/KgWorkStation.d.ts +44 -0
- package/dist/src/component/KgWorkStation/KgWorkStation.event.d.ts +27 -0
- package/dist/src/component/KgWorkStation/KgWorkStation.hooks.d.ts +28 -0
- package/dist/src/component/KgWorkStation/KgWorkStation.store.d.ts +37 -0
- package/dist/src/component/KgYesOrNo/KgYesOrNo.d.ts +60 -0
- package/dist/src/component/index.d.ts +22 -0
- package/dist/src/config/config.hooks.d.ts +10 -0
- package/dist/src/config/config.store.d.ts +304 -0
- package/dist/src/config/index.d.ts +63 -0
- package/dist/src/i18n/cs_CZ.d.ts +2 -0
- package/dist/src/i18n/en.d.ts +237 -0
- package/dist/src/i18n/es_ES.d.ts +2 -0
- package/dist/src/i18n/fr_FR.d.ts +2 -0
- package/dist/src/i18n/i18n.setup.d.ts +20 -0
- package/dist/src/i18n/index.d.ts +2 -0
- package/dist/src/i18n/km_KH.d.ts +2 -0
- package/dist/src/i18n/ko_KR.d.ts +2 -0
- package/dist/src/i18n/vi_VN.d.ts +2 -0
- package/dist/src/i18n/zh_CN.d.ts +238 -0
- package/dist/src/index.d.ts +12 -0
- package/dist/src/model/index.d.ts +1976 -0
- package/dist/src/page/KgPageCircularShuttleMonitor/KgPageCircularShuttleMonitor.d.ts +11 -0
- package/dist/src/page/KgPageDda/KgPageDda.d.ts +10 -0
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.Basic.SqlModal.d.ts +32 -0
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.Basic.d.ts +6 -0
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.Button.d.ts +6 -0
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.Menu.d.ts +6 -0
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.Search.d.ts +6 -0
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.Submit.d.ts +6 -0
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.Table.d.ts +6 -0
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.d.ts +32 -0
- package/dist/src/page/KgPageDda/components/KgPageDda.Create.store.d.ts +39 -0
- package/dist/src/page/KgPageDda/index.d.ts +5 -0
- package/dist/src/page/KgPageSqlClient/KgPageSqlClient.d.ts +12 -0
- package/dist/src/page/KgPageSqlClient/components/KgSqlClient.Editor.d.ts +13 -0
- package/dist/src/page/KgPageSqlClient/components/KgSqlClient.ResultTab.d.ts +36 -0
- package/dist/src/page/KgPageSqlClient/components/KgSqlClient.Toolbar.Top.d.ts +7 -0
- package/dist/src/page/KgPageSqlClient/components/KgSqlClient.d.ts +5 -0
- package/dist/src/page/index.d.ts +8 -0
- package/dist/src/project/build/getConfigFileName.d.ts +5 -0
- package/dist/src/project/build/index.d.ts +1 -0
- package/dist/src/project/index.d.ts +3 -0
- package/dist/src/project/src/api/sys/menu.d.ts +4 -0
- package/dist/src/project/src/api/sys/model/menuModel.d.ts +15 -0
- package/dist/src/project/src/api/sys/model/userModel.d.ts +46 -0
- package/dist/src/project/src/components/Application/src/useAppContext.d.ts +9 -0
- package/dist/src/project/src/components/index.d.ts +2 -0
- package/dist/src/project/src/enums/CompTypeEnum.d.ts +19 -0
- package/dist/src/project/src/enums/DateTypeEnum.d.ts +8 -0
- package/dist/src/project/src/enums/appEnum.d.ts +40 -0
- package/dist/src/project/src/enums/breakpointEnum.d.ts +18 -0
- package/dist/src/project/src/enums/cacheEnum.d.ts +18 -0
- package/dist/src/project/src/enums/exceptionEnum.d.ts +17 -0
- package/dist/src/project/src/enums/httpEnum.d.ts +38 -0
- package/dist/src/project/src/enums/jeecgEnum.d.ts +16 -0
- package/dist/src/project/src/enums/menuEnum.d.ts +35 -0
- package/dist/src/project/src/enums/pageEnum.d.ts +14 -0
- package/dist/src/project/src/enums/roleEnum.d.ts +4 -0
- package/dist/src/project/src/enums/sizeEnum.d.ts +18 -0
- package/dist/src/project/src/hooks/component/useFormItem.d.ts +2 -0
- package/dist/src/project/src/hooks/component/usePageContext.d.ts +10 -0
- package/dist/src/project/src/hooks/core/onMountedOrActivated.d.ts +1 -0
- package/dist/src/project/src/hooks/core/useAttrs.d.ts +9 -0
- package/dist/src/project/src/hooks/core/useContext.d.ts +11 -0
- package/dist/src/project/src/hooks/core/useRefs.d.ts +2 -0
- package/dist/src/project/src/hooks/core/useTimeout.d.ts +10 -0
- package/dist/src/project/src/hooks/event/useBreakpoint.d.ts +22 -0
- package/dist/src/project/src/hooks/event/useEventListener.d.ts +14 -0
- package/dist/src/project/src/hooks/event/useIntersectionObserver.d.ts +13 -0
- package/dist/src/project/src/hooks/event/useScrollTo.d.ts +10 -0
- package/dist/src/project/src/hooks/event/useWindowSizeFn.d.ts +7 -0
- package/dist/src/project/src/hooks/index.d.ts +21 -0
- package/dist/src/project/src/hooks/jeecg/useAdaptiveWidth.d.ts +18 -0
- package/dist/src/project/src/hooks/setting/index.d.ts +2 -0
- package/dist/src/project/src/hooks/web/useAppInject.d.ts +3 -0
- package/dist/src/project/src/hooks/web/useContentHeight.d.ts +24 -0
- package/dist/src/project/src/hooks/web/useCopyToClipboard.d.ts +10 -0
- package/dist/src/project/src/hooks/web/useDesign.d.ts +4 -0
- package/dist/src/project/src/hooks/web/usePage.d.ts +10 -0
- package/dist/src/project/src/hooks/web/usePagination.d.ts +7 -0
- package/dist/src/project/src/hooks/web/useWebSocket.d.ts +18 -0
- package/dist/src/project/src/layouts/default/content/useContentContext.d.ts +9 -0
- package/dist/src/project/src/layouts/default/content/useContentViewHeight.d.ts +7 -0
- package/dist/src/project/src/locales/helper.d.ts +4 -0
- package/dist/src/project/src/locales/setupI18n.d.ts +4 -0
- package/dist/src/project/src/locales/useLocale.d.ts +11 -0
- package/dist/src/project/src/router/constant2.d.ts +3 -0
- package/dist/src/project/src/router/types.d.ts +61 -0
- package/dist/src/project/src/settings/componentSetting.d.ts +44 -0
- package/dist/src/project/src/settings/designSetting.d.ts +6 -0
- package/dist/src/project/src/settings/encryptionSetting.d.ts +6 -0
- package/dist/src/project/src/settings/projectSetting.d.ts +3 -0
- package/dist/src/project/src/store/modules/locale.d.ts +38 -0
- package/dist/src/project/src/utils/auth/index.d.ts +19 -0
- package/dist/src/project/src/utils/bem.d.ts +15 -0
- package/dist/src/project/src/utils/cache/index.d.ts +7 -0
- package/dist/src/project/src/utils/cache/memory.d.ts +22 -0
- package/dist/src/project/src/utils/cache/persistent.d.ts +33 -0
- package/dist/src/project/src/utils/cache/storageCache.d.ts +8 -0
- package/dist/src/project/src/utils/cipher.d.ts +19 -0
- package/dist/src/project/src/utils/color.d.ts +29 -0
- package/dist/src/project/src/utils/common/compUtils.d.ts +87 -0
- package/dist/src/project/src/utils/common/functionUtils.d.ts +6 -0
- package/dist/src/project/src/utils/dateUtil.d.ts +4 -0
- package/dist/src/project/src/utils/domUtils.d.ts +28 -0
- package/dist/src/project/src/utils/encryption/signMd5Utils.d.ts +29 -0
- package/dist/src/project/src/utils/env.d.ts +16 -0
- package/dist/src/project/src/utils/event/index.d.ts +3 -0
- package/dist/src/project/src/utils/factory/createAsyncComponent.d.ts +9 -0
- package/dist/src/project/src/utils/file/base64Conver.d.ts +4 -0
- package/dist/src/project/src/utils/file/download.d.ts +9 -0
- package/dist/src/project/src/utils/helper/treeHelper.d.ts +34 -0
- package/dist/src/project/src/utils/helper/tsxHelper.d.ts +13 -0
- package/dist/src/project/src/utils/index.index.d.ts +42 -0
- package/dist/src/project/src/utils/is.d.ts +17 -0
- package/dist/src/project/src/utils/mitt.d.ts +26 -0
- package/dist/src/project/src/utils/propTypes.d.ts +9 -0
- package/dist/src/project/src/utils/props.d.ts +68 -0
- package/dist/src/project/src/utils/uuid.d.ts +2 -0
- package/dist/src/project/types/axios.d.ts +35 -0
- package/dist/src/project/types/config.d.ts +108 -0
- package/dist/src/project/types/store.d.ts +43 -0
- package/dist/src/project/types/utils.d.ts +4 -0
- package/dist/src/service/http-client.d.ts +98 -0
- package/dist/src/util/ant-design-vue.d.ts +347 -0
- package/dist/src/util/event.util.d.ts +15 -0
- package/dist/src/util/kg-auth.util.d.ts +12 -0
- package/dist/src/util/kg-route.util.d.ts +18 -0
- package/dist/src/util/kg.util.d.ts +347 -0
- package/dist/src/util/tsx.helper.d.ts +23 -0
- package/dist/stop-outlined.9f2c4f61.mjs +8 -0
- package/dist/stop.ea3dde55.mjs +8 -0
- package/dist/three-dots-loading-bIlrTJYR.ebceb73e.mjs +8 -0
- package/dist/upload-outlined.c576b26a.mjs +8 -0
- package/package.json +68 -10
- package/api/WMS/Controllers/DescriptionController/List.ts +0 -84
- package/api/WMS/Controllers/DescriptionController/ListByCodeNamesAndCodeValues.ts +0 -21
- package/api/WMS/Controllers/DescriptionController/index.ts +0 -2
- package/api/WMS/Controllers/SqlClientController/Execute.ts +0 -21
- package/api/WMS/Controllers/SqlClientController/ExecutePage.ts +0 -21
- package/api/WMS/Controllers/SqlClientController/index.ts +0 -2
- package/api/WMS/Controllers/SysPermissionController/List.ts +0 -117
- package/api/WMS/Controllers/SysPermissionController/index.ts +0 -1
- package/api/WMS/Controllers/VarConfigDescriptionController/Add.ts +0 -21
- package/api/WMS/Controllers/VarConfigDescriptionController/ListByFormId.ts +0 -21
- package/api/WMS/Controllers/VarConfigPossibilityController/ExecuteQuery.ts +0 -36
- package/api/WMS/Controllers/VarConfigPossibilityController/index.ts +0 -1
- package/api/WMS/Controllers/VarController/GetAll.ts +0 -21
- package/api/WMS/Controllers/VarController/index.ts +0 -1
- package/api/WMS/Controllers/VarDdaController/Create.ts +0 -21
- package/api/WMS/Controllers/VarDdaController/GetResultSetMetadataFromSql.ts +0 -21
- package/api/WMS/Controllers/VarDdaController/ValidateCopySql.ts +0 -21
- package/api/WMS/Controllers/VarDdaController/ValidateCreateSql.ts +0 -21
- package/api/WMS/Controllers/VarDdaController/ValidateDeleteSql.ts +0 -21
- package/api/WMS/Controllers/VarDdaController/ValidateFrmId.ts +0 -21
- package/api/WMS/Controllers/VarDdaController/ValidateSearchSql.ts +0 -21
- package/api/WMS/Controllers/VarDdaController/ValidateUpdateSql.ts +0 -21
- package/api/WMS/Controllers/VarDdaController/ValidateVarButtonVarName.ts +0 -21
- package/api/WMS/Controllers/VarDdaController/index.ts +0 -9
- package/api/WMS/Controllers/VarGridMasterController/QueryByID.ts +0 -36
- package/api/WMS/Controllers/VarGridMasterController/Update.ts +0 -21
- package/api/WMS/Controllers/VarGridMasterController/index.ts +0 -2
- package/api/WMS/Controllers/VarProfileMasterController/QueryByID.ts +0 -36
- package/api/WMS/Controllers/VarProfileMasterController/index.ts +0 -1
- package/api/WMS/Controllers/VarVariableController/Delete.ts +0 -21
- package/api/WMS/Controllers/VarVariableController/index.ts +0 -1
- package/api/WMS/Controllers/WarehouseController/ListVO.ts +0 -45
- package/api/WMS/Controllers/WorkstationController/List.ts +0 -45
- package/api/WMS/Controllers/WorkstationController/index.ts +0 -1
- package/api/WMS/index.ts +0 -2
- package/api/WMS/models.ts +0 -2113
- package/api/api.ts +0 -1
- package/api/def.ts +0 -1
- package/api/index.ts +0 -2
- package/asset/ant.less +0 -678
- package/asset/element-plus.css +0 -112
- package/asset/flag/cs_CZ.png +0 -0
- package/asset/flag/en.png +0 -0
- package/asset/flag/es_ES.png +0 -0
- package/asset/flag/fr_FR.png +0 -0
- package/asset/flag/km_KH.png +0 -0
- package/asset/flag/ko_KR.png +0 -0
- package/asset/flag/vi_VN.png +0 -0
- package/asset/flag/zh_CN.png +0 -0
- package/asset/images/warehouse.000000.svg +0 -9
- package/asset/images/warehouse.1890ff.svg +0 -9
- package/asset/index.less +0 -347
- package/asset/jeecg.less +0 -382
- package/asset/var.less +0 -3
- package/asset/vxe.less +0 -51
- package/component/KgAppSelect/KgAppSelect.event.ts +0 -52
- package/component/KgAppSelect/KgAppSelect.hooks.ts +0 -50
- package/component/KgAppSelect/KgAppSelect.less +0 -30
- package/component/KgAppSelect/KgAppSelect.store.ts +0 -162
- package/component/KgAppSelect/KgAppSelect.tsx +0 -60
- package/component/KgAppSelect/index.ts +0 -4
- package/component/KgButton/KgButton.Copy.tsx +0 -143
- package/component/KgButton/KgButton.Create.tsx +0 -208
- package/component/KgButton/KgButton.Delete.tsx +0 -156
- package/component/KgButton/KgButton.Export.tsx +0 -294
- package/component/KgButton/KgButton.Import.tsx +0 -247
- package/component/KgButton/KgButton.ImportTemplate.tsx +0 -214
- package/component/KgButton/KgButton.Item.tsx +0 -128
- package/component/KgButton/KgButton.Other.tsx +0 -292
- package/component/KgButton/KgButton.Search.tsx +0 -146
- package/component/KgButton/KgButton.Update.tsx +0 -210
- package/component/KgButton/KgButton.event.ts +0 -157
- package/component/KgButton/KgButton.hooks.ts +0 -117
- package/component/KgButton/KgButton.less +0 -187
- package/component/KgButton/KgButton.model.tsx +0 -39
- package/component/KgButton/KgButton.store.ts +0 -333
- package/component/KgButton/KgButton.tsx +0 -221
- package/component/KgCanvas/KgCanvas.ContextMenu.tsx +0 -181
- package/component/KgCanvas/KgCanvas.ToolbarButton.Fullscreen.tsx +0 -80
- package/component/KgCanvas/KgCanvas.ToolbarButton.Mode.tsx +0 -68
- package/component/KgCanvas/KgCanvas.ToolbarButton.OverviewScale.tsx +0 -66
- package/component/KgCanvas/KgCanvas.Tooltip.tsx +0 -118
- package/component/KgCanvas/KgCanvas.css +0 -128
- package/component/KgCanvas/KgCanvas.event.ts +0 -380
- package/component/KgCanvas/KgCanvas.hooks.ts +0 -181
- package/component/KgCanvas/KgCanvas.model.ts +0 -31
- package/component/KgCanvas/KgCanvas.service.tsx +0 -116
- package/component/KgCanvas/KgCanvas.store.ts +0 -68
- package/component/KgCanvas/KgCanvas.tsx +0 -632
- package/component/KgCanvas/index.ts +0 -5
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.AreaSelect.tsx +0 -107
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Canvas.service.tsx +0 -3053
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Canvas.tsx +0 -606
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Legend.tsx +0 -71
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Offline.tsx +0 -50
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Setting.tsx +0 -169
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Tab.Log.tsx +0 -30
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.Tab.Rgv.tsx +0 -672
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.css +0 -510
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.hooks.ts +0 -78
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.model.ts +0 -161
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.store.tsx +0 -744
- package/component/KgCircularShuttleMonitor/KgCircularShuttleMonitor.tsx +0 -171
- package/component/KgCircularShuttleMonitor/index.ts +0 -4
- package/component/KgForm/KgForm.event.ts +0 -328
- package/component/KgForm/KgForm.hooks.ts +0 -158
- package/component/KgForm/KgForm.less +0 -0
- package/component/KgForm/KgForm.store.ts +0 -36
- package/component/KgForm/KgForm.tsx +0 -61
- package/component/KgForm/index.ts +0 -10
- package/component/KgForm.Item/KgForm.Item.Addon.DynamicQueryOperator.tsx +0 -88
- package/component/KgForm.Item/KgForm.Item.Addon.Lookup.Modal.tsx +0 -191
- package/component/KgForm.Item/KgForm.Item.Addon.Lookup.tsx +0 -76
- package/component/KgForm.Item/KgForm.Item.Checkbox.tsx +0 -61
- package/component/KgForm.Item/KgForm.Item.CheckboxGroup.tsx +0 -176
- package/component/KgForm.Item/KgForm.Item.Date.tsx +0 -88
- package/component/KgForm.Item/KgForm.Item.DateRange.tsx +0 -110
- package/component/KgForm.Item/KgForm.Item.Image.tsx +0 -35
- package/component/KgForm.Item/KgForm.Item.Input.tsx +0 -72
- package/component/KgForm.Item/KgForm.Item.InputNumber.tsx +0 -68
- package/component/KgForm.Item/KgForm.Item.InputPassword.tsx +0 -72
- package/component/KgForm.Item/KgForm.Item.Link.tsx +0 -37
- package/component/KgForm.Item/KgForm.Item.RadioGroup.tsx +0 -91
- package/component/KgForm.Item/KgForm.Item.Select.service.tsx +0 -317
- package/component/KgForm.Item/KgForm.Item.Select.tsx +0 -236
- package/component/KgForm.Item/KgForm.Item.Switch.tsx +0 -49
- package/component/KgForm.Item/KgForm.Item.TextArea.tsx +0 -99
- package/component/KgForm.Item/KgForm.Item.less +0 -476
- package/component/KgForm.Item/KgForm.Item.model.ts +0 -129
- package/component/KgForm.Item/KgForm.Item.service.tsx +0 -479
- package/component/KgForm.Item/KgForm.Item.tsx +0 -642
- package/component/KgImage/KgImage.less +0 -12
- package/component/KgImage/KgImage.tsx +0 -73
- package/component/KgLayoutHeader/KgLayoutHeader.Locale.tsx +0 -118
- package/component/KgLayoutHeader/KgLayoutHeader.hooks.ts +0 -31
- package/component/KgLayoutHeader/KgLayoutHeader.less +0 -14
- package/component/KgLayoutHeader/index.ts +0 -3
- package/component/KgModal/KgModal.css +0 -234
- package/component/KgModal/KgModal.model.ts +0 -9
- package/component/KgModal/KgModal.service.ts +0 -560
- package/component/KgModal/KgModal.tsx +0 -207
- package/component/KgModal/KgModalHeaderButtons.tsx +0 -130
- package/component/KgModal02/KgModal02.css +0 -11
- package/component/KgModal02/KgModal02.model.ts +0 -1
- package/component/KgModal02/KgModal02.tsx +0 -93
- package/component/KgProgressA/KgProgressA.less +0 -35
- package/component/KgProgressA/KgProgressA.tsx +0 -90
- package/component/KgResizable/KgResizable.less +0 -114
- package/component/KgResizable/KgResizable.service.tsx +0 -41
- package/component/KgResizable/KgResizable.tsx +0 -239
- package/component/KgSearch/KgSearch.event.ts +0 -78
- package/component/KgSearch/KgSearch.hooks.ts +0 -160
- package/component/KgSearch/KgSearch.less +0 -251
- package/component/KgSearch/KgSearch.service.tsx +0 -236
- package/component/KgSearch/KgSearch.store.ts +0 -609
- package/component/KgSearch/KgSearch.tsx +0 -506
- package/component/KgSearch/index.ts +0 -4
- package/component/KgSimulator/KgSimulator.Canvas.Title.tsx +0 -71
- package/component/KgSimulator/KgSimulator.Canvas.service.tsx +0 -3403
- package/component/KgSimulator/KgSimulator.Canvas.tsx +0 -1105
- package/component/KgSimulator/KgSimulator.Menu.Scene.Create.CircularConveyor.tsx +0 -258
- package/component/KgSimulator/KgSimulator.Menu.Scene.Open.CircularConveyor.tsx +0 -214
- package/component/KgSimulator/KgSimulator.Menu.tsx +0 -446
- package/component/KgSimulator/KgSimulator.Panel.Prefab.tsx +0 -87
- package/component/KgSimulator/KgSimulator.Panel.Property.tsx +0 -1120
- package/component/KgSimulator/KgSimulator.Panel.Scene.tsx +0 -819
- package/component/KgSimulator/KgSimulator.Panel.tsx +0 -149
- package/component/KgSimulator/KgSimulator.Prefab.tsx +0 -142
- package/component/KgSimulator/KgSimulator.ToolbarButton.Prefab.tsx +0 -44
- package/component/KgSimulator/KgSimulator.ToolbarButton.Property.tsx +0 -40
- package/component/KgSimulator/KgSimulator.ToolbarButton.Scene.tsx +0 -40
- package/component/KgSimulator/KgSimulator.ToolbarButton.tsx +0 -130
- package/component/KgSimulator/KgSimulator.css +0 -610
- package/component/KgSimulator/KgSimulator.event.ts +0 -197
- package/component/KgSimulator/KgSimulator.hooks.ts +0 -237
- package/component/KgSimulator/KgSimulator.icons.tsx +0 -148
- package/component/KgSimulator/KgSimulator.model.ts +0 -2629
- package/component/KgSimulator/KgSimulator.store.tsx +0 -1192
- package/component/KgSimulator/KgSimulator.tsx +0 -235
- package/component/KgSimulator/KgSimulator.utils.ts +0 -30
- package/component/KgSimulator/index.ts +0 -4
- package/component/KgSubmit/KgSubmit.event.ts +0 -272
- package/component/KgSubmit/KgSubmit.hooks.ts +0 -662
- package/component/KgSubmit/KgSubmit.less +0 -174
- package/component/KgSubmit/KgSubmit.model.ts +0 -82
- package/component/KgSubmit/KgSubmit.service.tsx +0 -368
- package/component/KgSubmit/KgSubmit.store.ts +0 -568
- package/component/KgSubmit/KgSubmit.tsx +0 -1132
- package/component/KgSubmit/index.ts +0 -5
- package/component/KgTable/KgTable.BodyCell.tsx +0 -475
- package/component/KgTable/KgTable.HeadCell.tsx +0 -333
- package/component/KgTable/KgTable.Info.tsx +0 -133
- package/component/KgTable/KgTable.Setting.VarGridMaster.SaveAs.tsx +0 -63
- package/component/KgTable/KgTable.Setting.service.tsx +0 -285
- package/component/KgTable/KgTable.Setting.tsx +0 -377
- package/component/KgTable/KgTable.event.ts +0 -206
- package/component/KgTable/KgTable.hooks.ts +0 -235
- package/component/KgTable/KgTable.less +0 -912
- package/component/KgTable/KgTable.model.ts +0 -73
- package/component/KgTable/KgTable.service.tsx +0 -781
- package/component/KgTable/KgTable.store.ts +0 -390
- package/component/KgTable/KgTable.tsx +0 -1105
- package/component/KgTable/index.ts +0 -5
- package/component/KgTable02/KgTable02.BodyCell.tsx +0 -407
- package/component/KgTable02/KgTable02.css +0 -199
- package/component/KgTable02/KgTable02.event.ts +0 -224
- package/component/KgTable02/KgTable02.hooks.ts +0 -111
- package/component/KgTable02/KgTable02.store.ts +0 -186
- package/component/KgTable02/KgTable02.tsx +0 -865
- package/component/KgTable02/index.ts +0 -5
- package/component/KgVar/KgVar.Factory.tsx +0 -146
- package/component/KgVar/KgVar.css +0 -125
- package/component/KgVar/KgVar.event.ts +0 -122
- package/component/KgVar/KgVar.hooks.ts +0 -543
- package/component/KgVar/KgVar.model.ts +0 -86
- package/component/KgVar/KgVar.store.ts +0 -2966
- package/component/KgVar/KgVar.tsx +0 -276
- package/component/KgVar/index.ts +0 -6
- package/component/KgVarConfig/KgVarConfig.hooks.ts +0 -19
- package/component/KgVarConfig/KgVarConfig.less +0 -499
- package/component/KgVarConfig/KgVarConfig.model.ts +0 -56
- package/component/KgVarConfig/KgVarConfig.store.ts +0 -29
- package/component/KgVarConfig/KgVarConfig.tsx +0 -139
- package/component/KgVarConfig/components/KgVarConfig.SelectFormIdModal.tsx +0 -138
- package/component/KgVarConfig/components/KgVarConfigModal.tsx +0 -228
- package/component/KgVarConfig/components/button/KgVarConfig.Modal.Button.VarButton.tsx +0 -647
- package/component/KgVarConfig/components/button/KgVarConfig.Modal.Button.VarButtonConfig.tsx +0 -64
- package/component/KgVarConfig/components/button/KgVarConfig.Modal.Button.tsx +0 -44
- package/component/KgVarConfig/components/child/KgVarConfig.Modal.Child.tsx +0 -265
- package/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.VarProfileConfig.tsx +0 -64
- package/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.VarProfileMaster.service.tsx +0 -408
- package/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.VarProfileMaster.tsx +0 -399
- package/component/KgVarConfig/components/search/KgVarConfig.Modal.Search.tsx +0 -44
- package/component/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.VarSubmitConfig.tsx +0 -336
- package/component/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.VarSubmitDetail.tsx +0 -165
- package/component/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.tsx +0 -44
- package/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.VarGridConfig.tsx +0 -209
- package/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.VarGridMaster.service.tsx +0 -567
- package/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.VarGridMaster.tsx +0 -398
- package/component/KgVarConfig/components/table/KgVarConfig.Modal.Table.tsx +0 -44
- package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigControl.tsx +0 -162
- package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigDescription.tsx +0 -119
- package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigInput.tsx +0 -322
- package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigLookup.tsx +0 -222
- package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigPossibility.tsx +0 -194
- package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigTip.tsx +0 -134
- package/component/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarVariable.tsx +0 -129
- package/component/KgVarConfig/index.ts +0 -6
- package/component/KgWarehouse/KgWarehouse.event.ts +0 -63
- package/component/KgWarehouse/KgWarehouse.guard.ts +0 -77
- package/component/KgWarehouse/KgWarehouse.hooks.ts +0 -92
- package/component/KgWarehouse/KgWarehouse.less +0 -78
- package/component/KgWarehouse/KgWarehouse.store.ts +0 -135
- package/component/KgWarehouse/KgWarehouse.tsx +0 -321
- package/component/KgWarehouse/index.ts +0 -5
- package/component/KgWorkStation/KgWorkStation.css +0 -8
- package/component/KgWorkStation/KgWorkStation.event.ts +0 -54
- package/component/KgWorkStation/KgWorkStation.hooks.ts +0 -59
- package/component/KgWorkStation/KgWorkStation.store.ts +0 -144
- package/component/KgWorkStation/KgWorkStation.tsx +0 -254
- package/component/KgYesOrNo/KgYesOrNo.less +0 -3
- package/component/KgYesOrNo/KgYesOrNo.tsx +0 -50
- package/component/index.ts +0 -23
- package/config/config.hooks.ts +0 -32
- package/config/config.store.ts +0 -705
- package/config/index.ts +0 -347
- package/i18n/cs_CZ.ts +0 -1
- package/i18n/en.ts +0 -236
- package/i18n/es_ES.ts +0 -1
- package/i18n/fr_FR.ts +0 -1
- package/i18n/i18n.setup.ts +0 -61
- package/i18n/index.ts +0 -23
- package/i18n/km_KH.ts +0 -1
- package/i18n/ko_KR.ts +0 -1
- package/i18n/vi_VN.ts +0 -1
- package/i18n/zh_CN.ts +0 -237
- package/index.ts +0 -15
- package/model/index.ts +0 -1695
- package/page/KgPageCircularShuttleMonitor/KgPageCircularShuttleMonitor.tsx +0 -13
- package/page/KgPageDda/KgPageDda.css +0 -0
- package/page/KgPageDda/KgPageDda.tsx +0 -140
- package/page/KgPageDda/components/KgPageDda.Create.Basic.SqlModal.tsx +0 -65
- package/page/KgPageDda/components/KgPageDda.Create.Basic.tsx +0 -219
- package/page/KgPageDda/components/KgPageDda.Create.Button.tsx +0 -427
- package/page/KgPageDda/components/KgPageDda.Create.Menu.tsx +0 -148
- package/page/KgPageDda/components/KgPageDda.Create.Search.tsx +0 -371
- package/page/KgPageDda/components/KgPageDda.Create.Submit.tsx +0 -362
- package/page/KgPageDda/components/KgPageDda.Create.Table.tsx +0 -372
- package/page/KgPageDda/components/KgPageDda.Create.less +0 -362
- package/page/KgPageDda/components/KgPageDda.Create.store.ts +0 -437
- package/page/KgPageDda/components/KgPageDda.Create.tsx +0 -330
- package/page/KgPageDda/index.ts +0 -4
- package/page/KgPageSqlClient/KgPageSqlClient.tsx +0 -14
- package/page/KgPageSqlClient/components/KgSqlClient.Editor.tsx +0 -84
- package/page/KgPageSqlClient/components/KgSqlClient.ResultTab.tsx +0 -145
- package/page/KgPageSqlClient/components/KgSqlClient.Toolbar.Top.tsx +0 -132
- package/page/KgPageSqlClient/components/KgSqlClient.css +0 -171
- package/page/KgPageSqlClient/components/KgSqlClient.tsx +0 -110
- package/page/index.ts +0 -55
- package/project/build/generate/generateModifyVars.ts +0 -40
- package/project/index.ts +0 -2
- package/project/src/api/sys/menu.ts +0 -37
- package/project/src/api/sys/model/menuModel.ts +0 -17
- package/project/src/api/sys/model/userModel.ts +0 -58
- package/project/src/components/Application/src/useAppContext.ts +0 -17
- package/project/src/components/index.ts +0 -3
- package/project/src/enums/CompTypeEnum.ts +0 -32
- package/project/src/enums/DateTypeEnum.ts +0 -8
- package/project/src/enums/appEnum.ts +0 -58
- package/project/src/enums/breakpointEnum.ts +0 -28
- package/project/src/enums/cacheEnum.ts +0 -39
- package/project/src/enums/exceptionEnum.ts +0 -27
- package/project/src/enums/httpEnum.ts +0 -50
- package/project/src/enums/jeecgEnum.ts +0 -23
- package/project/src/enums/menuEnum.ts +0 -50
- package/project/src/enums/pageEnum.ts +0 -19
- package/project/src/enums/roleEnum.ts +0 -7
- package/project/src/enums/sizeEnum.ts +0 -27
- package/project/src/hooks/component/useFormItem.ts +0 -44
- package/project/src/hooks/component/usePageContext.ts +0 -18
- package/project/src/hooks/core/onMountedOrActivated.ts +0 -18
- package/project/src/hooks/core/useAttrs.ts +0 -41
- package/project/src/hooks/core/useContext.ts +0 -30
- package/project/src/hooks/core/useRefs.ts +0 -16
- package/project/src/hooks/core/useTimeout.ts +0 -45
- package/project/src/hooks/event/useBreakpoint.ts +0 -89
- package/project/src/hooks/event/useEventListener.ts +0 -52
- package/project/src/hooks/event/useIntersectionObserver.ts +0 -42
- package/project/src/hooks/event/useScrollTo.ts +0 -59
- package/project/src/hooks/event/useWindowSizeFn.ts +0 -36
- package/project/src/hooks/index.ts +0 -26
- package/project/src/hooks/jeecg/useAdaptiveWidth.ts +0 -82
- package/project/src/hooks/setting/index.ts +0 -27
- package/project/src/hooks/web/useAppInject.ts +0 -10
- package/project/src/hooks/web/useContentHeight.ts +0 -175
- package/project/src/hooks/web/useCopyToClipboard.ts +0 -70
- package/project/src/hooks/web/useDesign.ts +0 -10
- package/project/src/hooks/web/usePage.ts +0 -87
- package/project/src/hooks/web/usePagination.ts +0 -31
- package/project/src/hooks/web/useWebSocket.ts +0 -95
- package/project/src/layouts/default/content/useContentContext.ts +0 -17
- package/project/src/layouts/default/content/useContentViewHeight.ts +0 -42
- package/project/src/locales/helper.ts +0 -36
- package/project/src/locales/setupI18n.ts +0 -43
- package/project/src/locales/useLocale.ts +0 -77
- package/project/src/router/constant2.ts +0 -5
- package/project/src/router/types.ts +0 -73
- package/project/src/settings/componentSetting.ts +0 -88
- package/project/src/settings/designSetting.ts +0 -14
- package/project/src/settings/encryptionSetting.ts +0 -11
- package/project/src/settings/projectSetting.ts +0 -194
- package/project/src/store/modules/locale.ts +0 -49
- package/project/src/utils/auth/index.ts +0 -42
- package/project/src/utils/bem.ts +0 -45
- package/project/src/utils/cache/index.ts +0 -31
- package/project/src/utils/cache/memory.ts +0 -99
- package/project/src/utils/cache/persistent.ts +0 -132
- package/project/src/utils/cache/storageCache.ts +0 -102
- package/project/src/utils/cipher.ts +0 -54
- package/project/src/utils/color.ts +0 -93
- package/project/src/utils/common/compUtils.ts +0 -292
- package/project/src/utils/common/functionUtils.ts +0 -14
- package/project/src/utils/dateUtil.ts +0 -14
- package/project/src/utils/domUtils.ts +0 -158
- package/project/src/utils/encryption/signMd5Utils.ts +0 -122
- package/project/src/utils/env.ts +0 -40
- package/project/src/utils/event/index.ts +0 -39
- package/project/src/utils/factory/createAsyncComponent.tsx +0 -50
- package/project/src/utils/file/base64Conver.ts +0 -15
- package/project/src/utils/file/download.ts +0 -37
- package/project/src/utils/helper/treeHelper.ts +0 -145
- package/project/src/utils/helper/tsxHelper.ts +0 -35
- package/project/src/utils/index.index.ts +0 -158
- package/project/src/utils/is.ts +0 -85
- package/project/src/utils/mitt.ts +0 -101
- package/project/src/utils/propTypes.ts +0 -34
- package/project/src/utils/props.ts +0 -139
- package/project/src/utils/uuid.ts +0 -29
- package/project/types/axios.ts +0 -57
- package/project/types/config.ts +0 -180
- package/project/types/global.d.ts +0 -191
- package/project/types/store.ts +0 -60
- package/project/types/utils.ts +0 -5
- package/service/http-client.ts +0 -257
- package/tsconfig.json +0 -26
- package/type/env.d.ts +0 -7
- package/type/index.d.ts +0 -1
- package/util/ant-design-vue.ts +0 -146
- package/util/event.util.ts +0 -24
- package/util/kg-auth.util.ts +0 -16
- package/util/kg-route.util.ts +0 -25
- package/util/kg.util.tsx +0 -2997
- package/util/tsx.helper.tsx +0 -45
- /package/{project → dist/project}/build/config/themeConfig.ts +0 -0
- /package/{project → dist/project}/build/constant.ts +0 -0
- /package/{project → dist/project}/build/generate/icon/index.ts +0 -0
- /package/{project → dist/project}/build/getConfigFileName.ts +0 -0
- /package/{project → dist/project}/build/index.ts +0 -0
- /package/{project → dist/project}/build/script/buildConf.ts +0 -0
- /package/{project → dist/project}/build/script/postBuild.ts +0 -0
- /package/{project → dist/project}/build/utils.ts +0 -0
- /package/{project → dist/project}/build/vite/plugin/compress.ts +0 -0
- /package/{project → dist/project}/build/vite/plugin/html.ts +0 -0
- /package/{project → dist/project}/build/vite/plugin/imagemin.ts +0 -0
- /package/{project → dist/project}/build/vite/plugin/index.ts +0 -0
- /package/{project → dist/project}/build/vite/plugin/pwa.ts +0 -0
- /package/{project → dist/project}/build/vite/plugin/styleImport.ts +0 -0
- /package/{project → dist/project}/build/vite/plugin/svgSprite.ts +0 -0
- /package/{project → dist/project}/build/vite/plugin/theme.ts +0 -0
- /package/{project → dist/project}/build/vite/plugin/visualizer.ts +0 -0
- /package/{project → dist/project}/build/vite/proxy.ts +0 -0
- /package/{api/WMS/Controllers/VarConfigDescriptionController/index.ts → dist/src/api/WMS/Controllers/VarConfigDescriptionController/index.d.ts} +0 -0
- /package/{api/WMS/Controllers/WarehouseController/index.ts → dist/src/api/WMS/Controllers/WarehouseController/index.d.ts} +0 -0
- /package/{api/WMS/Controllers/index.ts → dist/src/api/WMS/Controllers/index.d.ts} +0 -0
- /package/{component/KgButton/index.ts → dist/src/component/KgButton/index.d.ts} +0 -0
- /package/{component/KgForm.Item/index.ts → dist/src/component/KgForm.Item/index.d.ts} +0 -0
- /package/{component/KgImage/index.ts → dist/src/component/KgImage/index.d.ts} +0 -0
- /package/{component/KgModal/index.ts → dist/src/component/KgModal/index.d.ts} +0 -0
- /package/{component/KgModal02/index.ts → dist/src/component/KgModal02/index.d.ts} +0 -0
- /package/{component/KgProgressA/index.ts → dist/src/component/KgProgressA/index.d.ts} +0 -0
- /package/{component/KgResizable/index.ts → dist/src/component/KgResizable/index.d.ts} +0 -0
- /package/{component/KgSearch/KgSearch.model.ts → dist/src/component/KgSearch/KgSearch.model.d.ts} +0 -0
- /package/{component/KgTable02/KgTable02.model.ts → dist/src/component/KgTable02/KgTable02.model.d.ts} +0 -0
- /package/{component/KgWorkStation/index.ts → dist/src/component/KgWorkStation/index.d.ts} +0 -0
- /package/{component/KgYesOrNo/index.ts → dist/src/component/KgYesOrNo/index.d.ts} +0 -0
- /package/{page/KgPageCircularShuttleMonitor/index.ts → dist/src/page/KgPageCircularShuttleMonitor/index.d.ts} +0 -0
- /package/{page/KgPageSqlClient/index.ts → dist/src/page/KgPageSqlClient/index.d.ts} +0 -0
- /package/{project/src/api/index.ts → dist/src/project/src/api/index.d.ts} +0 -0
- /package/{project/src/api/sys/model/uploadModel.ts → dist/src/project/src/api/sys/model/uploadModel.d.ts} +0 -0
- /package/{project/src/components/Dropdown/index.ts → dist/src/project/src/components/Dropdown/index.d.ts} +0 -0
- /package/{project/src/components/Dropdown/src/typing.ts → dist/src/project/src/components/Dropdown/src/typing.d.ts} +0 -0
- /package/{project/src/enums/index.ts → dist/src/project/src/enums/index.d.ts} +0 -0
- /package/{project/src/index.ts → dist/src/project/src/index.d.ts} +0 -0
- /package/{project/src/layouts/index.ts → dist/src/project/src/layouts/index.d.ts} +0 -0
- /package/{project/src/locales/index.ts → dist/src/project/src/locales/index.d.ts} +0 -0
- /package/{project/src/router/index.ts → dist/src/project/src/router/index.d.ts} +0 -0
- /package/{project/src/settings/index.ts → dist/src/project/src/settings/index.d.ts} +0 -0
- /package/{project/src/store/index.ts → dist/src/project/src/store/index.d.ts} +0 -0
- /package/{project/src/store/modules/index.ts → dist/src/project/src/store/modules/index.d.ts} +0 -0
- /package/{project/src/utils/index.ts → dist/src/project/src/utils/index.d.ts} +0 -0
- /package/{project/types/index.ts → dist/src/project/types/index.d.ts} +0 -0
- /package/{service/index.ts → dist/src/service/index.d.ts} +0 -0
- /package/{util/index.ts → dist/src/util/index.d.ts} +0 -0
package/util/kg.util.tsx
DELETED
|
@@ -1,2997 +0,0 @@
|
|
|
1
|
-
import { ____DEBUG____, ____ERROR____, KgCoreUtil } from '@kengic/core.core';
|
|
2
|
-
import { doKgWorkStation } from '@kengic/core.react';
|
|
3
|
-
import { Modal, notification, Select } from 'ant-design-vue';
|
|
4
|
-
import { ModalFuncProps } from 'ant-design-vue/lib/modal/Modal';
|
|
5
|
-
import dayjs, { Dayjs } from 'dayjs';
|
|
6
|
-
import { cloneDeep, isArray, isNil, isObjectLike, last, reduce } from 'lodash-es';
|
|
7
|
-
import { inject, toRaw, unref } from 'vue';
|
|
8
|
-
import { RouteLocationNormalizedLoaded } from 'vue-router';
|
|
9
|
-
import { useKgVar, useKgWarehouse } from '../component';
|
|
10
|
-
import { pinia, useKg } from '../config';
|
|
11
|
-
import {
|
|
12
|
-
IKgVarButtonModalProperties,
|
|
13
|
-
IKgVarConfigControlControlProperties,
|
|
14
|
-
IKgVarProfileDetailProperties,
|
|
15
|
-
KG,
|
|
16
|
-
KG__DYNAMIC_PARAM,
|
|
17
|
-
KG__DYNAMIC_PARAM_HASH,
|
|
18
|
-
KG__VAR_BUTTON__TYPE,
|
|
19
|
-
KG__VAR_CONFIG_POSSIBILITY__VALUE_DATA_TYPE,
|
|
20
|
-
KG_APP,
|
|
21
|
-
KG_APP_PREFIX,
|
|
22
|
-
KG_APPS,
|
|
23
|
-
KG_TMP_MENU_ID__BUSINESS_MANAGER,
|
|
24
|
-
KG_TMP_MENU_ID__DATA_MANAGER,
|
|
25
|
-
KG_TMP_MENU_ID__PDA,
|
|
26
|
-
KG_TMP_MENU_ID__SYS,
|
|
27
|
-
KG_TMP_MENU_ID__WCS,
|
|
28
|
-
} from '../model';
|
|
29
|
-
import { Menu } from '../project/src/router/types';
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* 工具方法.
|
|
33
|
-
*/
|
|
34
|
-
export class KgUtil {
|
|
35
|
-
/**
|
|
36
|
-
* 将 JSON 字符串转换为 JSON 对象, 如果转化失败, 则返回空对象.
|
|
37
|
-
*
|
|
38
|
-
* @param str JSON 字符串.
|
|
39
|
-
*/
|
|
40
|
-
public static tryParseJSON = KgCoreUtil.tryParseJSON;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* 获取一个 UUID.
|
|
44
|
-
*
|
|
45
|
-
* @param param.prefix 前缀, 默认为 ''.
|
|
46
|
-
* @return UUID.
|
|
47
|
-
*/
|
|
48
|
-
public static uuid = KgCoreUtil.uuid;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* 下载文件.
|
|
52
|
-
* @param data 文件数据.
|
|
53
|
-
* @param fileName 文件名称, 包含后缀.
|
|
54
|
-
* @param contentType <p>文件类型. 如果为空, 则根据文件名的后缀自动设置.</p>
|
|
55
|
-
* <ul>
|
|
56
|
-
* <li>XLS: <code>application/vnd.ms-excel</code></li>
|
|
57
|
-
* <li>XLSX: <code>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</code></li>
|
|
58
|
-
* </ul>
|
|
59
|
-
*/
|
|
60
|
-
public static downloadFile = KgCoreUtil.downloadFile;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* 根据'文件大小数值'获取'文件大小文本'.
|
|
64
|
-
* @param size 文件大小数值.
|
|
65
|
-
*/
|
|
66
|
-
public static getFileSize = KgCoreUtil.getFileSize;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* BASE64 转换为 BLOB.
|
|
70
|
-
* @param base64 base64 字符串.
|
|
71
|
-
* @param contentType 文件类型.
|
|
72
|
-
* @param sliceSize 分块大小.
|
|
73
|
-
*/
|
|
74
|
-
public static base64toBlob = KgCoreUtil.base64toBlob;
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* 显示全局遮罩.
|
|
78
|
-
*/
|
|
79
|
-
public static showLoading = KgCoreUtil.showLoading;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* 隐藏全局遮罩.
|
|
83
|
-
*/
|
|
84
|
-
public static hideLoading = KgCoreUtil.hideLoading;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* <p>使用 lodash 的 snakeCase() 将字符串转换为 snake_case 的命名方式, 并且去掉数字前面的下划线.</p>
|
|
88
|
-
*
|
|
89
|
-
* @param value 转换前的字符串.
|
|
90
|
-
* @return 转换后的字符串.
|
|
91
|
-
*/
|
|
92
|
-
public static snakeCase = KgCoreUtil.snakeCase;
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* <p>处理请求参数.</p>
|
|
96
|
-
* <ul>
|
|
97
|
-
* <li>删除无用属性,</li>
|
|
98
|
-
* <li>日期转换为字符串,</li>
|
|
99
|
-
* <li>解析动态属性, 比如「仓库号」等等,</li>
|
|
100
|
-
* </ul>
|
|
101
|
-
*
|
|
102
|
-
* @param params 请求参数.
|
|
103
|
-
* @param formID 界面标识.
|
|
104
|
-
* @param $dayjs dayjs.
|
|
105
|
-
*/
|
|
106
|
-
public static parseParams(params: Record<string, any> | null | undefined, formID?: string | null, $dayjs?: typeof dayjs): Record<string, any> {
|
|
107
|
-
let _params = cloneDeep(toRaw(unref(params ?? {})));
|
|
108
|
-
|
|
109
|
-
if (!_params || !isObjectLike(_params)) {
|
|
110
|
-
return _params ?? {};
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// 处理后的参数,
|
|
114
|
-
const resultParams: Record<string, any> = isArray(_params) ? [] : {};
|
|
115
|
-
|
|
116
|
-
// 有 formID 参数, 表示是 DDA 页面的查询
|
|
117
|
-
if (formID) {
|
|
118
|
-
Object.keys(_params)
|
|
119
|
-
.sort()
|
|
120
|
-
.forEach((key) => {
|
|
121
|
-
const value = _params[key];
|
|
122
|
-
|
|
123
|
-
switch (true) {
|
|
124
|
-
// 辅助属性, 用于业务逻辑, 不必传给接口, 删除
|
|
125
|
-
case key.endsWith('_obj') || ['__KG_IS_INIT__'].includes(key): {
|
|
126
|
-
resultParams[key] = undefined;
|
|
127
|
-
delete resultParams[key];
|
|
128
|
-
break;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// 日期
|
|
132
|
-
case !!$dayjs && $dayjs.isDayjs(value): {
|
|
133
|
-
resultParams[key] = this.parseParamsFromDayjs({ formID: formID, isPad: true, key: key, value: value });
|
|
134
|
-
break;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// 日期范围
|
|
138
|
-
case !!$dayjs && isArray(value) && value.length === 2 && $dayjs.isDayjs(value[0]) && $dayjs.isDayjs(value[1]): {
|
|
139
|
-
resultParams[key] = undefined;
|
|
140
|
-
|
|
141
|
-
const _leftValue = value[0] as Dayjs;
|
|
142
|
-
const _rightValue = value[1] as Dayjs;
|
|
143
|
-
|
|
144
|
-
// 左侧日期的字符串
|
|
145
|
-
let _leftStringValue = this.parseParamsFromDayjs({ formID: formID, key: key, value: _leftValue });
|
|
146
|
-
|
|
147
|
-
// 右侧日期的字符串
|
|
148
|
-
let _rightStringValue = '';
|
|
149
|
-
|
|
150
|
-
switch (true) {
|
|
151
|
-
// 左侧日期为空
|
|
152
|
-
case !_leftStringValue: {
|
|
153
|
-
_rightStringValue = this.parseParamsFromDayjs({ formID: formID, isPad: true, key: key, value: _rightValue });
|
|
154
|
-
break;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
// 日期格式为 YYYY-MM-DD HH:mm:ss
|
|
158
|
-
case /\d\d-\d\d-\d\d \d\d:\d\d:\d\d/.test(_leftStringValue): {
|
|
159
|
-
if (_rightValue.isValid()) {
|
|
160
|
-
_rightStringValue = _rightValue.add(1, 'second').format('YYYY-MM-DD HH:mm:ss');
|
|
161
|
-
}
|
|
162
|
-
break;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
// 日期格式为 YYYY-MM-DD
|
|
166
|
-
case /\d\d-\d\d-\d\d/.test(_leftStringValue): {
|
|
167
|
-
_leftStringValue = `${_leftStringValue} 00:00:00`;
|
|
168
|
-
if (_rightValue.isValid()) {
|
|
169
|
-
_rightStringValue = _rightValue.add(1, 'day').format('YYYY-MM-DD 00:00:00');
|
|
170
|
-
}
|
|
171
|
-
break;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
// 日期格式为 HH:mm:ss
|
|
175
|
-
case /\d\d:\d\d:\d\d/.test(_leftStringValue): {
|
|
176
|
-
_leftStringValue = `1900-01-01 ${_leftStringValue}`;
|
|
177
|
-
if (_rightValue.isValid()) {
|
|
178
|
-
_rightStringValue = _rightValue.add(1, 'second').format('1900-01-01 HH:mm:ss');
|
|
179
|
-
}
|
|
180
|
-
break;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
resultParams[`${key}_begin`] = _leftStringValue;
|
|
185
|
-
resultParams[`${key}_end`] = _rightStringValue;
|
|
186
|
-
|
|
187
|
-
break;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
// object, array
|
|
191
|
-
case isObjectLike(value): {
|
|
192
|
-
resultParams[key] = this.parseParams(value, formID, $dayjs);
|
|
193
|
-
break;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
// string
|
|
197
|
-
case typeof value === 'string': {
|
|
198
|
-
resultParams[key] = this.parseParamsFromString({ $dayjs: $dayjs, formID: formID, value: value, varName: key });
|
|
199
|
-
break;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
// number, boolean, null, undefined
|
|
203
|
-
default: {
|
|
204
|
-
resultParams[key] = value ?? null;
|
|
205
|
-
break;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
return resultParams;
|
|
211
|
-
}
|
|
212
|
-
// 无 formID 参数, 表示是非 DDA 页面的查询
|
|
213
|
-
else {
|
|
214
|
-
Object.keys(_params)
|
|
215
|
-
.sort()
|
|
216
|
-
.forEach((key) => {
|
|
217
|
-
const value = _params[key];
|
|
218
|
-
|
|
219
|
-
switch (true) {
|
|
220
|
-
// 辅助属性, 用于业务逻辑, 不必传给接口, 删除
|
|
221
|
-
case key.endsWith('_obj'): {
|
|
222
|
-
resultParams[key] = undefined;
|
|
223
|
-
delete resultParams[key];
|
|
224
|
-
break;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
// 日期
|
|
228
|
-
case !!$dayjs && $dayjs.isDayjs(value):
|
|
229
|
-
resultParams[key] = this.parseParamsFromDayjs({ key: key, value: value });
|
|
230
|
-
break;
|
|
231
|
-
|
|
232
|
-
// 日期范围
|
|
233
|
-
case !!$dayjs && isArray(value) && value.length === 2 && $dayjs.isDayjs(value[0]) && $dayjs.isDayjs(value[1]):
|
|
234
|
-
resultParams[key] = undefined;
|
|
235
|
-
resultParams[`${key}_begin`] = this.parseParamsFromDayjs({ key: key, value: value[0] });
|
|
236
|
-
resultParams[`${key}_end`] = this.parseParamsFromDayjs({ key: key, value: value[1] });
|
|
237
|
-
break;
|
|
238
|
-
|
|
239
|
-
// object, array
|
|
240
|
-
case isObjectLike(value):
|
|
241
|
-
resultParams[key] = this.parseParams(value, null, $dayjs);
|
|
242
|
-
break;
|
|
243
|
-
|
|
244
|
-
// string
|
|
245
|
-
case typeof value === 'string':
|
|
246
|
-
resultParams[key] = this.parseParamsFromString({ $dayjs: $dayjs, value: value });
|
|
247
|
-
break;
|
|
248
|
-
|
|
249
|
-
// number, boolean, null, undefined
|
|
250
|
-
default:
|
|
251
|
-
resultParams[key] = value ?? null;
|
|
252
|
-
break;
|
|
253
|
-
}
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
return resultParams;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* 处理请求参数: 解析字符串类型的参数值.
|
|
262
|
-
*
|
|
263
|
-
* <ol>
|
|
264
|
-
* <li>替换动态参数, '动态参数'需要被替换成实际的值, 动态参数定义参考 {@link KG__DYNAMIC_PARAM }.</li>
|
|
265
|
-
* </ol>
|
|
266
|
-
*
|
|
267
|
-
* @param param.$dayjs dayjs.
|
|
268
|
-
* @param param.formID 界面标识.
|
|
269
|
-
* @param param.value 参数的原始值.
|
|
270
|
-
* @param param.varName 变量名称.
|
|
271
|
-
*/
|
|
272
|
-
private static parseParamsFromString(param: { $dayjs?: typeof dayjs; formID?: string | null; value: string; varName?: string | null }): any {
|
|
273
|
-
const { formID, $dayjs, value, varName } = param ?? {};
|
|
274
|
-
|
|
275
|
-
if (typeof value !== 'string') {
|
|
276
|
-
return value;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
const kg = useKg();
|
|
280
|
-
const kgVar = formID ? useKgVar(formID) : null;
|
|
281
|
-
|
|
282
|
-
// 去除首尾空格,
|
|
283
|
-
let _value: string = value.trim();
|
|
284
|
-
|
|
285
|
-
// 替换动态参数
|
|
286
|
-
_value = (() => {
|
|
287
|
-
switch (true) {
|
|
288
|
-
case _value.includes(KG__DYNAMIC_PARAM.EMPTY_STRING):
|
|
289
|
-
return _value.replaceAll(KG__DYNAMIC_PARAM.EMPTY_STRING, '');
|
|
290
|
-
|
|
291
|
-
case _value.includes(KG__DYNAMIC_PARAM.WAREHOUSE):
|
|
292
|
-
return _value.replaceAll(KG__DYNAMIC_PARAM.WAREHOUSE, useKgWarehouse().warehouse.value?.whId ?? '');
|
|
293
|
-
|
|
294
|
-
case _value.includes(KG__DYNAMIC_PARAM.WORK_STATION):
|
|
295
|
-
return _value.replaceAll(KG__DYNAMIC_PARAM.WORK_STATION, doKgWorkStation().workStation?.devcod ?? '');
|
|
296
|
-
|
|
297
|
-
case _value.includes(KG__DYNAMIC_PARAM.WORK_AREA):
|
|
298
|
-
return _value.replaceAll(KG__DYNAMIC_PARAM.WORK_AREA, doKgWorkStation().workStationArea?.wrkare ?? '');
|
|
299
|
-
|
|
300
|
-
case _value.includes(KG__DYNAMIC_PARAM.LOCALE):
|
|
301
|
-
return _value.replaceAll(KG__DYNAMIC_PARAM.LOCALE, kg.locale?.value ?? '');
|
|
302
|
-
|
|
303
|
-
case _value.includes(KG__DYNAMIC_PARAM.NOW): {
|
|
304
|
-
if ($dayjs) {
|
|
305
|
-
return _value.replaceAll(KG__DYNAMIC_PARAM.NOW, $dayjs().format('YYYY-MM-DD HH:mm:ss'));
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
return _value;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
case _value.includes(KG__DYNAMIC_PARAM.USER):
|
|
312
|
-
return _value.replaceAll(KG__DYNAMIC_PARAM.USER, kg.useUserStore?.(pinia)?.userInfo?.username ?? '');
|
|
313
|
-
|
|
314
|
-
case _value.includes(KG__DYNAMIC_PARAM.ROW): {
|
|
315
|
-
if (kgVar && varName) {
|
|
316
|
-
return _value.replaceAll(KG__DYNAMIC_PARAM.ROW, kgVar.kgTable.selectedRow.value?.[varName]);
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
return _value;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
default: {
|
|
323
|
-
const execResult: RegExpExecArray | null = /(.*)?({(.*)?})(.*)?/.exec(_value);
|
|
324
|
-
|
|
325
|
-
if (!execResult) {
|
|
326
|
-
return _value;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
// 去掉首尾的 {}, 例如 `WAREHOUSE`,
|
|
330
|
-
const key = execResult[2].slice(1, -1);
|
|
331
|
-
|
|
332
|
-
switch (true) {
|
|
333
|
-
// 如果参数值以':query'结尾, 表示这个参数的值需要从 url 中的查询参数中获取,
|
|
334
|
-
case key.endsWith(':query'): {
|
|
335
|
-
return ((kg.router?.currentRoute as unknown as RouteLocationNormalizedLoaded)?.query[key.slice(0, -6)] as any) ?? '';
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
break;
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
return _value;
|
|
343
|
-
})();
|
|
344
|
-
|
|
345
|
-
// 替换包含特殊字符的动态参数,
|
|
346
|
-
_value = (() => {
|
|
347
|
-
let result = _value;
|
|
348
|
-
|
|
349
|
-
if (_value) {
|
|
350
|
-
Object.keys(KG__DYNAMIC_PARAM_HASH).forEach((dynamicParamKey) => {
|
|
351
|
-
const dynamicParamValue = KG__DYNAMIC_PARAM_HASH[dynamicParamKey as keyof typeof KG__DYNAMIC_PARAM_HASH];
|
|
352
|
-
if (_value.includes(dynamicParamValue)) {
|
|
353
|
-
result = result.replaceAll(dynamicParamValue, KG__DYNAMIC_PARAM[dynamicParamKey as keyof typeof KG__DYNAMIC_PARAM]);
|
|
354
|
-
}
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
return result;
|
|
359
|
-
})();
|
|
360
|
-
|
|
361
|
-
return _value;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
/**
|
|
365
|
-
* 处理请求参数: 解析 Dayjs 类型的参数值.
|
|
366
|
-
*
|
|
367
|
-
* @param param.formID 界面标识.
|
|
368
|
-
* @param param.isPad 是否补齐日期格式. 即将 `YYYY-MM-DD` 补齐为 `YYYY-MM-DD 00:00:00`, 将 `HH:mm:ss` 补齐为 `1900-01-01 HH:mm:ss`.
|
|
369
|
-
* @param param.key 属性名.
|
|
370
|
-
* @param param.value 参数的原始值.
|
|
371
|
-
*/
|
|
372
|
-
private static parseParamsFromDayjs(param: { formID?: string | null; isPad?: boolean; key: string; value: any }): string {
|
|
373
|
-
const { key, value, formID, isPad } = param;
|
|
374
|
-
|
|
375
|
-
if (!value || !value.isValid()) {
|
|
376
|
-
return '';
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
if (!formID) {
|
|
380
|
-
return value.format('YYYY-MM-DD HH:mm:ss');
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
const kgVar = useKgVar(formID);
|
|
384
|
-
|
|
385
|
-
// 控件类型
|
|
386
|
-
const controlType: string | null = (() => {
|
|
387
|
-
switch (true) {
|
|
388
|
-
case kgVar.kgTable.isRetrieving.value || kgVar.kgTable02.isRequesting:
|
|
389
|
-
return kgVar.getVarConfigControl({ buttonType: KG__VAR_BUTTON__TYPE.SEARCH, varName: key })?.ctrl_typ ?? KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_DATETIME;
|
|
390
|
-
|
|
391
|
-
default: {
|
|
392
|
-
// 如果没有当前按钮, 则使用查询按钮, TODO LT 这个主要是由于多个界面公用查询条件时这个问题导致的,
|
|
393
|
-
if (!kgVar.kgButton.currentButton) {
|
|
394
|
-
return kgVar.getVarConfigControl({ buttonType: KG__VAR_BUTTON__TYPE.SEARCH, varName: key })?.ctrl_typ ?? KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_DATETIME;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
return kgVar.getVarConfigControl({ varName: key })?.ctrl_typ ?? KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_DATETIME;
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
})();
|
|
401
|
-
|
|
402
|
-
if (!controlType) {
|
|
403
|
-
____ERROR____(`KgUtil.parseParamsFromDayjs | 控件类型没有找到 | ${formID} | ${key}`);
|
|
404
|
-
return value;
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
switch (controlType) {
|
|
408
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_DATE:
|
|
409
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_DATE_RANGE:
|
|
410
|
-
if (isPad) {
|
|
411
|
-
return value.format('YYYY-MM-DD 00:00:00');
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
return value.format('YYYY-MM-DD');
|
|
415
|
-
|
|
416
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_TIME:
|
|
417
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_TIME_RANGE:
|
|
418
|
-
if (isPad) {
|
|
419
|
-
return value.format('1900-01-01 HH:mm:ss');
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
return value.format('HH:mm:ss');
|
|
423
|
-
|
|
424
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_DATETIME:
|
|
425
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_DATETIME_RANGE:
|
|
426
|
-
return value.format('YYYY-MM-DD HH:mm:ss');
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
return value;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
/**
|
|
433
|
-
* <p>确认弹窗.</p>
|
|
434
|
-
* <p>设置了多个属性的默认值, 简化使用.</p>
|
|
435
|
-
* <p>https://www.antdv.com/components/modal</p>
|
|
436
|
-
*
|
|
437
|
-
* @param props
|
|
438
|
-
*/
|
|
439
|
-
public static confirm(props: IKgVarButtonModalProperties): ModalFunc {
|
|
440
|
-
const kg = useKg();
|
|
441
|
-
|
|
442
|
-
const modalRef = Modal.confirm({
|
|
443
|
-
autoFocusButton: null,
|
|
444
|
-
cancelButtonProps: {
|
|
445
|
-
...{
|
|
446
|
-
// 通过设置样式, 隐藏取消按钮
|
|
447
|
-
class: props.kgHideCancelButton === true ? 'kg-invisible' : '',
|
|
448
|
-
},
|
|
449
|
-
disabled: false,
|
|
450
|
-
...(props.cancelButtonProps ?? {}),
|
|
451
|
-
},
|
|
452
|
-
cancelText: kg.t('kg.cancel', {}, '取消'),
|
|
453
|
-
centered: true,
|
|
454
|
-
closable: false,
|
|
455
|
-
content: kg.t('kg.confirmDelete', {}, '确认删除 ?'),
|
|
456
|
-
iconType: 'warning',
|
|
457
|
-
keyboard: false,
|
|
458
|
-
okButtonProps: {
|
|
459
|
-
danger: true,
|
|
460
|
-
...(props.okButtonProps ?? {}),
|
|
461
|
-
},
|
|
462
|
-
okText: kg.t('kg.ok', {}, '确定'),
|
|
463
|
-
title: kg.t('kg.confirm', {}, '确认'),
|
|
464
|
-
...props,
|
|
465
|
-
});
|
|
466
|
-
|
|
467
|
-
// 确认按钮显示加载状态, 取消按钮禁用, 表示正在执行操作
|
|
468
|
-
// @ts-ignore
|
|
469
|
-
modalRef.showLoading = () => {
|
|
470
|
-
// @ts-ignore
|
|
471
|
-
modalRef.update((props: ModalFuncProps) => {
|
|
472
|
-
const _props = cloneDeep(props);
|
|
473
|
-
_props.okButtonProps!.loading = true;
|
|
474
|
-
_props.cancelButtonProps!.disabled = true;
|
|
475
|
-
return _props;
|
|
476
|
-
});
|
|
477
|
-
};
|
|
478
|
-
|
|
479
|
-
// @ts-ignore
|
|
480
|
-
modalRef.hideLoading = () => {
|
|
481
|
-
// @ts-ignore
|
|
482
|
-
modalRef.update((props: ModalFuncProps) => {
|
|
483
|
-
const _props = cloneDeep(props);
|
|
484
|
-
_props.okButtonProps!.loading = false;
|
|
485
|
-
_props.cancelButtonProps!.disabled = false;
|
|
486
|
-
return _props;
|
|
487
|
-
});
|
|
488
|
-
};
|
|
489
|
-
|
|
490
|
-
return modalRef as ModalFunc;
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
/** @deprecated 已弃用, 请使用 {@link KgUtil.throwNotFormValidationError()} 方法. */
|
|
494
|
-
public static throwIfNotFormError(e: any): void {
|
|
495
|
-
if (isObjectLike(e) && 'errorFields' in e && 'outOfDate' in e && 'values' in e) {
|
|
496
|
-
return;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
throw e;
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
/**
|
|
503
|
-
* <p>如果不是表单验证错误, 则直接抛出该错误.</p>
|
|
504
|
-
* <p>如果是表单验证错误, 则弹框提示表单验证失败消息.</p>
|
|
505
|
-
*
|
|
506
|
-
* @param param.error 错误对象.
|
|
507
|
-
* @param param.formID 界面标识. 通过界面标识可以显示对应字段的翻译, 否则只能显示对应字段的变量名称.
|
|
508
|
-
* @param param.isShowFormValidationErrorMessage 是否弹框提示表单验证失败消息. 默认为 true.
|
|
509
|
-
*/
|
|
510
|
-
public static throwNotFormValidationError(param: {
|
|
511
|
-
error:
|
|
512
|
-
| {
|
|
513
|
-
errorFields: Array<{ errors: Array<string>; name: Array<string>; warnings: Array<any> }>;
|
|
514
|
-
outOfDate: boolean;
|
|
515
|
-
values: Record<string, any>;
|
|
516
|
-
}
|
|
517
|
-
| any;
|
|
518
|
-
formID?: string;
|
|
519
|
-
isShowFormValidationErrorMessage?: boolean;
|
|
520
|
-
}): void {
|
|
521
|
-
const { formID, error, isShowFormValidationErrorMessage = true } = param ?? {};
|
|
522
|
-
|
|
523
|
-
if (isObjectLike(error) && 'errorFields' in error && 'outOfDate' in error && 'values' in error) {
|
|
524
|
-
if (isShowFormValidationErrorMessage) {
|
|
525
|
-
const kg = useKg();
|
|
526
|
-
|
|
527
|
-
const kgVar = formID ? useKgVar(formID) : null;
|
|
528
|
-
|
|
529
|
-
notification.error({
|
|
530
|
-
message: () => (
|
|
531
|
-
<>
|
|
532
|
-
<span>{kg.t('kg.formValidationFail')}:</span>
|
|
533
|
-
|
|
534
|
-
<div style={{ alignItems: 'center', display: 'flex', justifyContent: 'center', marginTop: '8px' }}>
|
|
535
|
-
<div style={{ marginRight: '6px' }}>{error.errorFields?.map((i: any) => i.errors.map((j: string, index: number) => <div>{index === 0 ? (kgVar ? kgVar.t(i.name?.[0]).value : i.name?.[0]) : ' '}:</div>))}</div>
|
|
536
|
-
|
|
537
|
-
<div style={{ flex: '1 1 0%', minWidth: '0px' }}>{error.errorFields?.map((i: any) => i.errors.map((j: string) => <div style={{ color: '#ED6F6F' }}>{j}</div>))}</div>
|
|
538
|
-
</div>
|
|
539
|
-
</>
|
|
540
|
-
),
|
|
541
|
-
});
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
return;
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
throw error;
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
/**
|
|
551
|
-
* 将值转换为 Dayjs 对象.
|
|
552
|
-
* @param value 值.
|
|
553
|
-
*/
|
|
554
|
-
public static toDayjs(value: any): Dayjs | undefined {
|
|
555
|
-
if (value === undefined) {
|
|
556
|
-
return undefined;
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
// 注入由项目提供的 dayjs 实例, 否则调用 isDayjs() 结果不对
|
|
560
|
-
const $dayjs = inject('$dayjs', dayjs);
|
|
561
|
-
|
|
562
|
-
const date = $dayjs(value);
|
|
563
|
-
if (date?.isValid()) {
|
|
564
|
-
return date;
|
|
565
|
-
} else {
|
|
566
|
-
return undefined;
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
/**
|
|
571
|
-
* 判断当前登录用户是否是管理员.
|
|
572
|
-
* @return {} 如果当前登录用户是管理员则返回 true, 否则返回 false.
|
|
573
|
-
*/
|
|
574
|
-
public static isAdminUser(): boolean {
|
|
575
|
-
const kg = useKg();
|
|
576
|
-
|
|
577
|
-
if (kg.useUserStore?.(pinia)?.getUserInfo?.username === 'admin') {
|
|
578
|
-
return true;
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
return false;
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
/**
|
|
585
|
-
* 判断某个模块是否具有访问权限.
|
|
586
|
-
* @param app 模块.
|
|
587
|
-
* @return {} 如果模块具有访问权限则返回 true, 否则返回 false.
|
|
588
|
-
*/
|
|
589
|
-
public static isAppAuthenticated(app: string | null | undefined): boolean {
|
|
590
|
-
if (!app) {
|
|
591
|
-
____DEBUG____(`KgUtil | isAppAuthenticated() | 模块为空.`, { app });
|
|
592
|
-
return false;
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
const kg = useKg();
|
|
596
|
-
const paths = kg.usePermissionStore?.(pinia)?.getBackMenuList?.map((i) => i.path);
|
|
597
|
-
|
|
598
|
-
if (paths?.some((i) => KgUtil.isPathInApp(i, app))) {
|
|
599
|
-
return true;
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
return false;
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
/**
|
|
606
|
-
* 判断某个地址是否具有访问权限.
|
|
607
|
-
*
|
|
608
|
-
* @param path 地址.
|
|
609
|
-
* @return {} 如果地址具有访问权限则返回 true, 否则返回 false.
|
|
610
|
-
*/
|
|
611
|
-
public static isPathAuthenticated(path: string | null | undefined): boolean {
|
|
612
|
-
if (!path) {
|
|
613
|
-
____DEBUG____(`KgUtil | isPathAuthenticated() | 地址为空.`, { path });
|
|
614
|
-
return false;
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
if (KgUtil.isAdminUser()) {
|
|
618
|
-
return true;
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
const kg = useKg();
|
|
622
|
-
const menus = kg.usePermissionStore?.(pinia)?.getBackMenuList;
|
|
623
|
-
|
|
624
|
-
____DEBUG____(`KgUtil | isPathAuthenticated() | 菜单列表.`, { path, menus });
|
|
625
|
-
if (KgUtil.getMenuByPath(menus, path)) {
|
|
626
|
-
return true;
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
return false;
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
/**
|
|
633
|
-
* 获取权限策略.
|
|
634
|
-
* @param permissionCode 权限编码.
|
|
635
|
-
* @return {} 权限策略.
|
|
636
|
-
*/
|
|
637
|
-
public static getPermissionType(permissionCode: string | null | undefined): number | null {
|
|
638
|
-
if (!permissionCode) {
|
|
639
|
-
return null;
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
const kg = useKg();
|
|
643
|
-
const permissionStore = kg.usePermissionStore?.(pinia);
|
|
644
|
-
const permission = permissionStore?.authList?.find((i) => i.action === permissionCode);
|
|
645
|
-
|
|
646
|
-
const type = Number(permission?.type);
|
|
647
|
-
if (type !== 1 && type !== 2) {
|
|
648
|
-
return null;
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
return type;
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
/**
|
|
655
|
-
* 根据菜单地址地址获取菜单.
|
|
656
|
-
*
|
|
657
|
-
* @param menus 菜单列表.
|
|
658
|
-
* @param path 菜单地址.
|
|
659
|
-
* @return {} 如果能找到某个菜单的地址等于传入的地址, 则返回该菜单, 否则返回 null.
|
|
660
|
-
*/
|
|
661
|
-
public static getMenuByPath(menus: Array<Menu> | null | undefined, path: string): Menu | null {
|
|
662
|
-
if (!menus) {
|
|
663
|
-
return null;
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
for (let menu of menus) {
|
|
667
|
-
// 不显示的菜单不做匹配
|
|
668
|
-
if (!menu.hideMenu && menu.path === path) {
|
|
669
|
-
return menu;
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
if (menu.children?.length) {
|
|
673
|
-
const childMenu = KgUtil.getMenuByPath(menu.children, path);
|
|
674
|
-
if (childMenu) {
|
|
675
|
-
return childMenu;
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
return null;
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
/**
|
|
684
|
-
* 获取第一个类型为叶子节点的菜单, 即第一个没有下级菜单的菜单, 即第一个拥有页面的菜单.
|
|
685
|
-
* 如果参数 app 不为空, 表示只在该模块的菜单中找; 否则在所有的菜单中找.
|
|
686
|
-
* @param app 模块.
|
|
687
|
-
* @return {} 如果能找到, 则返回该菜单, 否则返回 null.
|
|
688
|
-
*/
|
|
689
|
-
public static getFirstLeafMenu(app?: string | null): Menu | null {
|
|
690
|
-
const kg = useKg();
|
|
691
|
-
const menus = kg.usePermissionStore?.(pinia)?.getBackMenuList;
|
|
692
|
-
|
|
693
|
-
if (!menus) {
|
|
694
|
-
return null;
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
const _getFirstLeafMenu = (_menus: Array<Menu>): Menu | null => {
|
|
698
|
-
for (let menu of _menus) {
|
|
699
|
-
if (app && !KgUtil.isPathInApp(menu.path, app)) {
|
|
700
|
-
continue;
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
if ((menu?.children?.length ?? 0) > 0) {
|
|
704
|
-
return _getFirstLeafMenu(menu.children!);
|
|
705
|
-
} else {
|
|
706
|
-
return menu ?? null;
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
return null;
|
|
711
|
-
};
|
|
712
|
-
|
|
713
|
-
return _getFirstLeafMenu(menus);
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
/**
|
|
717
|
-
* 翻译菜单标题.
|
|
718
|
-
*
|
|
719
|
-
* @param menus 菜单列表, 树形结构.
|
|
720
|
-
*/
|
|
721
|
-
public static translateMenus(menus: Array<Menu> | null | undefined): Array<Menu> {
|
|
722
|
-
if (!menus) {
|
|
723
|
-
return [];
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
const kg = useKg();
|
|
727
|
-
|
|
728
|
-
menus.forEach((menu: Menu) => {
|
|
729
|
-
if (menu.title) {
|
|
730
|
-
menu.title$raw = menu.title;
|
|
731
|
-
menu.title = kg.t(menu.title);
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
//
|
|
735
|
-
if (menu.meta?.title) {
|
|
736
|
-
menu.meta.title$raw = menu.meta.title;
|
|
737
|
-
|
|
738
|
-
if (menu.title) {
|
|
739
|
-
menu.meta.title = menu.title;
|
|
740
|
-
} else {
|
|
741
|
-
menu.meta.title = kg.t(menu.meta.title);
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
//
|
|
746
|
-
if (menu.name) {
|
|
747
|
-
menu.name$raw = menu.name;
|
|
748
|
-
|
|
749
|
-
if (menu.title) {
|
|
750
|
-
menu.name = menu.title;
|
|
751
|
-
} else {
|
|
752
|
-
menu.name = kg.t(menu.name);
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
//
|
|
757
|
-
if (menu.slotTitle) {
|
|
758
|
-
menu.slotTitle$raw = menu.slotTitle;
|
|
759
|
-
|
|
760
|
-
if (menu.title) {
|
|
761
|
-
menu.slotTitle = menu.title;
|
|
762
|
-
} else {
|
|
763
|
-
menu.slotTitle = kg.t(menu.slotTitle);
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
KgUtil.translateMenus(menu.children!);
|
|
768
|
-
});
|
|
769
|
-
|
|
770
|
-
return menus;
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
/**
|
|
774
|
-
* <p>转换菜单列表.</p>
|
|
775
|
-
* <ol>
|
|
776
|
-
* <li>根据模块分组,</li>
|
|
777
|
-
* </ol>
|
|
778
|
-
* @param menus 菜单列表, 树形结构.
|
|
779
|
-
*/
|
|
780
|
-
public static transformMenus(menus: Array<Menu> | null | undefined): Array<Menu> {
|
|
781
|
-
if (!menus) {
|
|
782
|
-
return [];
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
const kg = useKg();
|
|
786
|
-
|
|
787
|
-
// 菜单的某些属性值是错误的, 需要先修复它们,
|
|
788
|
-
const fixMenus = (_menus: Array<Menu>) => {
|
|
789
|
-
_menus.forEach((_menu) => {
|
|
790
|
-
// 属性 key 和 value 必须一样,
|
|
791
|
-
if (_menu.key && _menu.key !== _menu.value) {
|
|
792
|
-
_menu.value = _menu.key;
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
if (_menu.children) {
|
|
796
|
-
fixMenus(_menu.children);
|
|
797
|
-
}
|
|
798
|
-
});
|
|
799
|
-
};
|
|
800
|
-
|
|
801
|
-
fixMenus(menus);
|
|
802
|
-
|
|
803
|
-
// 模块菜单:通用属性
|
|
804
|
-
const menuProperties = {
|
|
805
|
-
parentId: '',
|
|
806
|
-
app: null,
|
|
807
|
-
perms: null,
|
|
808
|
-
permsType: null,
|
|
809
|
-
icon: 'NULL',
|
|
810
|
-
component: '',
|
|
811
|
-
componentName: '',
|
|
812
|
-
url: '',
|
|
813
|
-
redirect: null,
|
|
814
|
-
menuType: 0,
|
|
815
|
-
isLeaf: false,
|
|
816
|
-
route: false,
|
|
817
|
-
keepAlive: false,
|
|
818
|
-
description: null,
|
|
819
|
-
delFlag: 0,
|
|
820
|
-
createBy: null,
|
|
821
|
-
createTime: null,
|
|
822
|
-
updateBy: null,
|
|
823
|
-
updateTime: null,
|
|
824
|
-
alwaysShow: false,
|
|
825
|
-
hidden: false,
|
|
826
|
-
status: null,
|
|
827
|
-
internalOrExternal: false,
|
|
828
|
-
leaf: false,
|
|
829
|
-
};
|
|
830
|
-
|
|
831
|
-
// 模块菜单:数据管理
|
|
832
|
-
const menuDataManager: Menu = {
|
|
833
|
-
children: [],
|
|
834
|
-
id: KG_TMP_MENU_ID__DATA_MANAGER,
|
|
835
|
-
key: KG_TMP_MENU_ID__DATA_MANAGER,
|
|
836
|
-
name: kg.option.appTitle?.[KG_APP.WMS_DATA_MANAGER] ?? '数据管理',
|
|
837
|
-
slotTitle: kg.option.appTitle?.[KG_APP.WMS_DATA_MANAGER] ?? '数据管理',
|
|
838
|
-
sortNo: 1,
|
|
839
|
-
title: kg.option.appTitle?.[KG_APP.WMS_DATA_MANAGER] ?? '数据管理',
|
|
840
|
-
...menuProperties,
|
|
841
|
-
url: KG_APP_PREFIX.WMS_DATA_MANAGER,
|
|
842
|
-
value: KG_TMP_MENU_ID__DATA_MANAGER,
|
|
843
|
-
};
|
|
844
|
-
|
|
845
|
-
// 模块菜单:仓库管理
|
|
846
|
-
const menuBusinessManager: Menu = {
|
|
847
|
-
children: [],
|
|
848
|
-
id: KG_TMP_MENU_ID__BUSINESS_MANAGER,
|
|
849
|
-
key: KG_TMP_MENU_ID__BUSINESS_MANAGER,
|
|
850
|
-
name: kg.option.appTitle?.[KG_APP.WMS_BUSINESS_MANAGER] ?? '仓库管理',
|
|
851
|
-
slotTitle: kg.option.appTitle?.[KG_APP.WMS_BUSINESS_MANAGER] ?? '仓库管理',
|
|
852
|
-
sortNo: 2,
|
|
853
|
-
title: kg.option.appTitle?.[KG_APP.WMS_BUSINESS_MANAGER] ?? '仓库管理',
|
|
854
|
-
...menuProperties,
|
|
855
|
-
url: KG_APP_PREFIX.WMS_BUSINESS_MANAGER,
|
|
856
|
-
value: KG_TMP_MENU_ID__BUSINESS_MANAGER,
|
|
857
|
-
};
|
|
858
|
-
|
|
859
|
-
// 模块菜单:WCS
|
|
860
|
-
const menuWCS: Menu = {
|
|
861
|
-
children: [],
|
|
862
|
-
id: KG_TMP_MENU_ID__WCS,
|
|
863
|
-
key: KG_TMP_MENU_ID__WCS,
|
|
864
|
-
name: kg.option.appTitle?.[KG_APP.WCS] ?? 'WCS',
|
|
865
|
-
slotTitle: kg.option.appTitle?.[KG_APP.WCS] ?? 'WCS',
|
|
866
|
-
sortNo: 3,
|
|
867
|
-
title: kg.option.appTitle?.[KG_APP.WCS] ?? 'WCS',
|
|
868
|
-
...menuProperties,
|
|
869
|
-
url: KG_APP_PREFIX.WCS,
|
|
870
|
-
value: KG_TMP_MENU_ID__WCS,
|
|
871
|
-
};
|
|
872
|
-
|
|
873
|
-
// 模块菜单:系统配置
|
|
874
|
-
const menuSys: Menu = {
|
|
875
|
-
id: KG_TMP_MENU_ID__SYS,
|
|
876
|
-
key: KG_TMP_MENU_ID__SYS,
|
|
877
|
-
title: kg.option.appTitle?.[KG_APP.SYS] ?? '系统配置',
|
|
878
|
-
name: kg.option.appTitle?.[KG_APP.SYS] ?? '系统配置',
|
|
879
|
-
slotTitle: kg.option.appTitle?.[KG_APP.SYS] ?? '系统配置',
|
|
880
|
-
sortNo: 4,
|
|
881
|
-
children: [],
|
|
882
|
-
...menuProperties,
|
|
883
|
-
url: KG_APP_PREFIX.SYS,
|
|
884
|
-
value: KG_TMP_MENU_ID__SYS,
|
|
885
|
-
};
|
|
886
|
-
|
|
887
|
-
// 模块:PDA
|
|
888
|
-
const menuPDA: Menu = {
|
|
889
|
-
id: KG_TMP_MENU_ID__PDA,
|
|
890
|
-
key: KG_TMP_MENU_ID__PDA,
|
|
891
|
-
value: KG_TMP_MENU_ID__PDA,
|
|
892
|
-
title: 'PDA',
|
|
893
|
-
name: 'PDA',
|
|
894
|
-
slotTitle: 'PDA',
|
|
895
|
-
sortNo: 5,
|
|
896
|
-
children: [],
|
|
897
|
-
...menuProperties,
|
|
898
|
-
};
|
|
899
|
-
|
|
900
|
-
menus.forEach((menu: Menu) => {
|
|
901
|
-
switch (true) {
|
|
902
|
-
case menu.app === 'PDA':
|
|
903
|
-
menu.parentId = KG_TMP_MENU_ID__PDA;
|
|
904
|
-
menuPDA.children!.push(menu);
|
|
905
|
-
break;
|
|
906
|
-
|
|
907
|
-
case KgUtil.isPathInApp(menu.url, KG_APP.WMS_DATA_MANAGER):
|
|
908
|
-
menu.parentId = KG_TMP_MENU_ID__DATA_MANAGER;
|
|
909
|
-
menuDataManager.children!.push(menu);
|
|
910
|
-
break;
|
|
911
|
-
|
|
912
|
-
case KgUtil.isPathInApp(menu.url, KG_APP.WMS_BUSINESS_MANAGER):
|
|
913
|
-
menu.parentId = KG_TMP_MENU_ID__BUSINESS_MANAGER;
|
|
914
|
-
menuBusinessManager.children!.push(menu);
|
|
915
|
-
break;
|
|
916
|
-
|
|
917
|
-
case KgUtil.isPathInApp(menu.url, KG_APP.WCS):
|
|
918
|
-
menu.parentId = KG_TMP_MENU_ID__WCS;
|
|
919
|
-
menuWCS.children!.push(menu);
|
|
920
|
-
break;
|
|
921
|
-
|
|
922
|
-
case KgUtil.isPathInApp(menu.url, KG_APP.SYS):
|
|
923
|
-
menu.parentId = KG_TMP_MENU_ID__SYS;
|
|
924
|
-
menuSys.children!.push(menu);
|
|
925
|
-
break;
|
|
926
|
-
}
|
|
927
|
-
});
|
|
928
|
-
|
|
929
|
-
let _menus: Array<Menu> = [];
|
|
930
|
-
|
|
931
|
-
// 如果某个模块下面没有菜单, 则不显示这个模块,
|
|
932
|
-
if (menuDataManager.children?.length ?? 0 > 0) {
|
|
933
|
-
_menus.push(menuDataManager);
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
if (menuBusinessManager.children?.length ?? 0 > 0) {
|
|
937
|
-
_menus.push(menuBusinessManager);
|
|
938
|
-
}
|
|
939
|
-
|
|
940
|
-
if (menuWCS.children?.length ?? 0 > 0) {
|
|
941
|
-
_menus.push(menuWCS);
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
if (menuSys.children?.length ?? 0 > 0) {
|
|
945
|
-
_menus.push(menuSys);
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
if (menuPDA.children?.length ?? 0 > 0) {
|
|
949
|
-
_menus.push(menuPDA);
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
// 排序
|
|
953
|
-
const sortMenus = (_menus: Array<Menu>) => {
|
|
954
|
-
_menus.sort((x, y) => Number(x?.sortNo ?? 0) - Number(y?.sortNo ?? 0));
|
|
955
|
-
|
|
956
|
-
_menus.forEach((_menu) => {
|
|
957
|
-
if (_menu.children) {
|
|
958
|
-
sortMenus(_menu.children);
|
|
959
|
-
}
|
|
960
|
-
});
|
|
961
|
-
};
|
|
962
|
-
|
|
963
|
-
sortMenus(_menus);
|
|
964
|
-
|
|
965
|
-
return _menus;
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
/**
|
|
969
|
-
* 判断某个路径是否属于某个模块.
|
|
970
|
-
* @param path 路径.
|
|
971
|
-
* @param app 模块.
|
|
972
|
-
*/
|
|
973
|
-
public static isPathInApp(path: string | null | undefined, app: string | null): boolean {
|
|
974
|
-
if (!path || !app) {
|
|
975
|
-
return false;
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
// 一些特殊地址, 不属于任何的模块
|
|
979
|
-
const SPECIAL_PATHS = ['/home'];
|
|
980
|
-
|
|
981
|
-
switch (app) {
|
|
982
|
-
case KG_APP.WMS_DATA_MANAGER:
|
|
983
|
-
return path.startsWith(KG_APP_PREFIX.WMS_DATA_MANAGER);
|
|
984
|
-
|
|
985
|
-
case KG_APP.WMS_BUSINESS_MANAGER:
|
|
986
|
-
return path.startsWith(KG_APP_PREFIX.WMS_BUSINESS_MANAGER);
|
|
987
|
-
|
|
988
|
-
case KG_APP.WCS:
|
|
989
|
-
return path.startsWith(KG_APP_PREFIX.WCS);
|
|
990
|
-
|
|
991
|
-
case KG_APP.SYS:
|
|
992
|
-
return path.startsWith(KG_APP_PREFIX.SYS) || (!SPECIAL_PATHS.includes(path) && !path.startsWith(KG_APP_PREFIX.WMS_DATA_MANAGER) && !path.startsWith(KG_APP_PREFIX.WMS_BUSINESS_MANAGER) && !path.startsWith(KG_APP_PREFIX.WCS));
|
|
993
|
-
|
|
994
|
-
default:
|
|
995
|
-
throw new Error(`未知模块: ${app}`);
|
|
996
|
-
}
|
|
997
|
-
}
|
|
998
|
-
|
|
999
|
-
/**
|
|
1000
|
-
* 根据地址获取模块.
|
|
1001
|
-
* @param path 地址.
|
|
1002
|
-
* @return {} 地址所属模块.
|
|
1003
|
-
*/
|
|
1004
|
-
public static getAppByPath(path: string | null | undefined): string | null {
|
|
1005
|
-
const app = KG_APPS.find((app) => KgUtil.isPathInApp(path, app));
|
|
1006
|
-
if (app) {
|
|
1007
|
-
return app;
|
|
1008
|
-
}
|
|
1009
|
-
|
|
1010
|
-
return null;
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
|
-
/**
|
|
1014
|
-
* 获取模块的首页地址.
|
|
1015
|
-
* @param app 模块.
|
|
1016
|
-
* @return {} 该模块的首页地址.
|
|
1017
|
-
* @throws {} 如果模块无法识别, 会报错.
|
|
1018
|
-
*/
|
|
1019
|
-
public static getAppIndexPath(app: string): string {
|
|
1020
|
-
const kg = useKg();
|
|
1021
|
-
|
|
1022
|
-
let path = '';
|
|
1023
|
-
|
|
1024
|
-
switch (app) {
|
|
1025
|
-
case KG_APP.WMS_DATA_MANAGER:
|
|
1026
|
-
path = kg.option.appIndex?.[KG_APP.WMS_DATA_MANAGER] || `${KG_APP_PREFIX.WMS_DATA_MANAGER}/index`;
|
|
1027
|
-
break;
|
|
1028
|
-
|
|
1029
|
-
case KG_APP.WMS_BUSINESS_MANAGER:
|
|
1030
|
-
path = kg.option.appIndex?.[KG_APP.WMS_BUSINESS_MANAGER] || `${KG_APP_PREFIX.WMS_BUSINESS_MANAGER}/index`;
|
|
1031
|
-
break;
|
|
1032
|
-
|
|
1033
|
-
case KG_APP.WCS:
|
|
1034
|
-
path = kg.option.appIndex?.[KG_APP.WCS] || `${KG_APP_PREFIX.WCS}/index`;
|
|
1035
|
-
break;
|
|
1036
|
-
|
|
1037
|
-
case KG_APP.SYS:
|
|
1038
|
-
path = kg.option.appIndex?.[KG_APP.SYS] || `${KG_APP_PREFIX.SYS}/index`;
|
|
1039
|
-
break;
|
|
1040
|
-
|
|
1041
|
-
default:
|
|
1042
|
-
throw new Error(`未知模块: ${app}`);
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
return path;
|
|
1046
|
-
}
|
|
1047
|
-
|
|
1048
|
-
/**
|
|
1049
|
-
* <p>将 JSON 字符串形式的参数 `'{"foo":1,"bar":2}'` 转换为对象形式的参数 `{ "foo": 1, "bar": 2 }`.</p>
|
|
1050
|
-
*
|
|
1051
|
-
* @param params JSON 字符串形式的参数.
|
|
1052
|
-
* @return {} 参数对象.
|
|
1053
|
-
*/
|
|
1054
|
-
public static parseRequestParamsToJSON(params: string | null | undefined): Record<string, any> {
|
|
1055
|
-
let paramsJSON: Record<string, any> = {};
|
|
1056
|
-
|
|
1057
|
-
if (!params) {
|
|
1058
|
-
return paramsJSON;
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
const _params = decodeURIComponent(params);
|
|
1062
|
-
|
|
1063
|
-
try {
|
|
1064
|
-
paramsJSON = JSON.parse(_params);
|
|
1065
|
-
} catch {
|
|
1066
|
-
____ERROR____('KgUtil.parseRequestParamsToJSON() | 参数格式错误, 必须是一个 JSON 字符串.', { params: _params });
|
|
1067
|
-
}
|
|
1068
|
-
|
|
1069
|
-
return paramsJSON;
|
|
1070
|
-
}
|
|
1071
|
-
|
|
1072
|
-
/**
|
|
1073
|
-
* <p>根据控件类型, 将表单控件的值转换为合法的值.</p>
|
|
1074
|
-
*
|
|
1075
|
-
* @param param.$dayjs dayjs.
|
|
1076
|
-
* @param param.buttonVarName 「变量配置:表单控件」所属的按钮的变量名称.
|
|
1077
|
-
* @param param.formID 界面标识.
|
|
1078
|
-
* @param param.isParseDynamicParam 是否替换动态参数. 默认为 true.
|
|
1079
|
-
* @param param.oldValue 转换之前的值.
|
|
1080
|
-
* @param param.varName 变量名称.
|
|
1081
|
-
* @return {} 转换之后的值.
|
|
1082
|
-
*/
|
|
1083
|
-
public static transformVarSubmitDetailValue(param: { $dayjs: typeof dayjs; buttonVarName: string | null | undefined; formID: string; isParseDynamicParam?: boolean; oldValue: any; varName: string }): any {
|
|
1084
|
-
const { formID, varName, $dayjs, oldValue, isParseDynamicParam = true, buttonVarName } = param ?? {};
|
|
1085
|
-
|
|
1086
|
-
const kgVar = useKgVar(formID);
|
|
1087
|
-
|
|
1088
|
-
let _value0 = toRaw(unref(isParseDynamicParam ? KgUtil.parseParamsFromString({ value: oldValue, formID: formID, varName: varName, $dayjs: $dayjs }) : oldValue));
|
|
1089
|
-
|
|
1090
|
-
const varConfigControl = kgVar.getVarConfigControl({ buttonVarName: buttonVarName, varName: varName });
|
|
1091
|
-
if (!varConfigControl) {
|
|
1092
|
-
return _value0;
|
|
1093
|
-
}
|
|
1094
|
-
|
|
1095
|
-
// 表单控件类型
|
|
1096
|
-
const controlType = varConfigControl.ctrl_typ || KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.INPUT;
|
|
1097
|
-
|
|
1098
|
-
switch (controlType) {
|
|
1099
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.INPUT:
|
|
1100
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.INPUT_PASSWORD:
|
|
1101
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.TEXT_AREA: {
|
|
1102
|
-
if (isNil(_value0)) {
|
|
1103
|
-
return null;
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
return String(_value0);
|
|
1107
|
-
}
|
|
1108
|
-
|
|
1109
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.INPUT_NUMBER: {
|
|
1110
|
-
if (isNil(_value0)) {
|
|
1111
|
-
return undefined;
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
const _value = Number(_value0);
|
|
1115
|
-
|
|
1116
|
-
if (Number.isNaN(_value)) {
|
|
1117
|
-
// prettier-ignore
|
|
1118
|
-
____ERROR____(`| 控件的值非法 | ${controlType} 控件的值必须为数字类型.`, { formID: formID, varName: varName, value: _value0 });
|
|
1119
|
-
return undefined;
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
return _value;
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.CHECKBOX: {
|
|
1126
|
-
if (isNil(_value0)) {
|
|
1127
|
-
return 0;
|
|
1128
|
-
}
|
|
1129
|
-
|
|
1130
|
-
const controlProperties = KgCoreUtil.tryParseJSON<IKgVarConfigControlControlProperties['CHECKBOX']>(varConfigControl.ctrl_prop);
|
|
1131
|
-
|
|
1132
|
-
if (controlProperties.dataType === 'BOOLEAN') {
|
|
1133
|
-
// 转换为布尔类型的值,
|
|
1134
|
-
const _value = (() => {
|
|
1135
|
-
if (_value0 === true || _value0 === 1 || _value0 === '1') {
|
|
1136
|
-
return true;
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
|
-
if (_value0 === false || _value0 === 0 || _value0 === '0') {
|
|
1140
|
-
return false;
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
if (typeof _value0 === 'string' && _value0.toUpperCase() === 'TRUE') {
|
|
1144
|
-
return true;
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
|
-
if (typeof _value0 === 'string' && _value0.toUpperCase() === 'FALSE') {
|
|
1148
|
-
return false;
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
|
-
return undefined;
|
|
1152
|
-
})();
|
|
1153
|
-
|
|
1154
|
-
if (isNil(_value)) {
|
|
1155
|
-
// prettier-ignore
|
|
1156
|
-
____ERROR____(`| 控件的值非法 | ${controlType} 控件的值必须为 true 或 false.`, { formID: formID, value: _value0, varName: varName });
|
|
1157
|
-
return undefined;
|
|
1158
|
-
}
|
|
1159
|
-
|
|
1160
|
-
return _value;
|
|
1161
|
-
} else {
|
|
1162
|
-
const _value = Number(_value0);
|
|
1163
|
-
|
|
1164
|
-
if (Number.isNaN(_value) || ![0, 1].includes(_value)) {
|
|
1165
|
-
// prettier-ignore
|
|
1166
|
-
____ERROR____(`| 控件的值非法 | ${controlType} 控件的值必须为 0 或 1.`, { formID: formID, value: _value0, varName: varName });
|
|
1167
|
-
return undefined;
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1170
|
-
return _value;
|
|
1171
|
-
}
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.SWITCH: {
|
|
1175
|
-
if (isNil(_value0)) {
|
|
1176
|
-
return 0;
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
|
-
const controlProperties = KgCoreUtil.tryParseJSON<IKgVarConfigControlControlProperties['SWITCH']>(varConfigControl.ctrl_prop);
|
|
1180
|
-
|
|
1181
|
-
if (controlProperties.dataType === 'BOOLEAN') {
|
|
1182
|
-
// 转换为布尔类型的值,
|
|
1183
|
-
const _value = (() => {
|
|
1184
|
-
if (_value0 === true || _value0 === 1 || _value0 === '1') {
|
|
1185
|
-
return true;
|
|
1186
|
-
}
|
|
1187
|
-
|
|
1188
|
-
if (_value0 === false || _value0 === 0 || _value0 === '0') {
|
|
1189
|
-
return false;
|
|
1190
|
-
}
|
|
1191
|
-
|
|
1192
|
-
if (typeof _value0 === 'string' && _value0.toUpperCase() === 'TRUE') {
|
|
1193
|
-
return true;
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
|
-
if (typeof _value0 === 'string' && _value0.toUpperCase() === 'FALSE') {
|
|
1197
|
-
return false;
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
return undefined;
|
|
1201
|
-
})();
|
|
1202
|
-
|
|
1203
|
-
if (isNil(_value)) {
|
|
1204
|
-
// prettier-ignore
|
|
1205
|
-
____ERROR____(`| 控件的值非法 | ${controlType} 控件的值必须为 true 或 false.`, { formID: formID, value: _value0, varName: varName });
|
|
1206
|
-
return undefined;
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1209
|
-
return _value;
|
|
1210
|
-
} else {
|
|
1211
|
-
const _value = Number(_value0);
|
|
1212
|
-
|
|
1213
|
-
if (Number.isNaN(_value) || ![0, 1].includes(_value)) {
|
|
1214
|
-
// prettier-ignore
|
|
1215
|
-
____ERROR____(`| 控件的值非法 | ${controlType} 控件的值必须为 0 或 1.`, { formID: formID, value: _value0, varName: varName });
|
|
1216
|
-
return undefined;
|
|
1217
|
-
}
|
|
1218
|
-
|
|
1219
|
-
return _value;
|
|
1220
|
-
}
|
|
1221
|
-
}
|
|
1222
|
-
|
|
1223
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_TIME: {
|
|
1224
|
-
if (isNil(_value0) || _value0.trim() === '') {
|
|
1225
|
-
return undefined;
|
|
1226
|
-
}
|
|
1227
|
-
|
|
1228
|
-
const date = $dayjs(`1900-01-01 ${_value0}`);
|
|
1229
|
-
if (date?.isValid()) {
|
|
1230
|
-
return date;
|
|
1231
|
-
} else {
|
|
1232
|
-
// prettier-ignore
|
|
1233
|
-
____ERROR____(`| 控件的值非法 | ${controlType} 控件的值必须为时间类型.`, { formID: formID, varName: varName, value: _value0 });
|
|
1234
|
-
return undefined;
|
|
1235
|
-
}
|
|
1236
|
-
}
|
|
1237
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_DATE:
|
|
1238
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_DATETIME:
|
|
1239
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_WEEK:
|
|
1240
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_MONTH:
|
|
1241
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_YEAR: {
|
|
1242
|
-
if (isNil(_value0)) {
|
|
1243
|
-
return undefined;
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
|
-
const date = $dayjs(_value0);
|
|
1247
|
-
if (date?.isValid()) {
|
|
1248
|
-
return date;
|
|
1249
|
-
} else {
|
|
1250
|
-
// prettier-ignore
|
|
1251
|
-
____ERROR____(`| 控件的值非法 | ${controlType} 控件的值必须为日期类型.`, { formID: formID, varName: varName, value: _value0 });
|
|
1252
|
-
return undefined;
|
|
1253
|
-
}
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.SELECT_MULTIPLE:
|
|
1257
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.CHECKBOX_GROUP: {
|
|
1258
|
-
if (isNil(_value0)) {
|
|
1259
|
-
return [];
|
|
1260
|
-
}
|
|
1261
|
-
|
|
1262
|
-
try {
|
|
1263
|
-
let datas = _value0;
|
|
1264
|
-
if (typeof datas === 'string') {
|
|
1265
|
-
datas = JSON.parse(_value0);
|
|
1266
|
-
}
|
|
1267
|
-
|
|
1268
|
-
if (!isArray(datas)) {
|
|
1269
|
-
// prettier-ignore
|
|
1270
|
-
____ERROR____(`| 控件的值非法 | ${controlType} 控件的值必须为数组类型.`, { formID: formID, varName: varName, value: _value0 });
|
|
1271
|
-
return undefined;
|
|
1272
|
-
}
|
|
1273
|
-
|
|
1274
|
-
const varConfigPossibility = kgVar.getVarConfigPossibility({ varName: varName });
|
|
1275
|
-
|
|
1276
|
-
switch (varConfigPossibility?.val_data_type) {
|
|
1277
|
-
case KG__VAR_CONFIG_POSSIBILITY__VALUE_DATA_TYPE.NUMBER: {
|
|
1278
|
-
const _value = datas.map((i) => Number(i));
|
|
1279
|
-
|
|
1280
|
-
if (_value.some((i) => Number.isNaN(_value))) {
|
|
1281
|
-
// prettier-ignore
|
|
1282
|
-
____ERROR____(`| 控件的值非法 | ${controlType} 控件的值必须为 number 数组类型.`, { VarConfigPossibility: varConfigPossibility, formID: formID, value: _value0, varName: varName });
|
|
1283
|
-
return undefined;
|
|
1284
|
-
}
|
|
1285
|
-
|
|
1286
|
-
return _value;
|
|
1287
|
-
}
|
|
1288
|
-
|
|
1289
|
-
case KG__VAR_CONFIG_POSSIBILITY__VALUE_DATA_TYPE.BOOLEAN:
|
|
1290
|
-
return datas.map((i) => Boolean(i));
|
|
1291
|
-
|
|
1292
|
-
case KG__VAR_CONFIG_POSSIBILITY__VALUE_DATA_TYPE.STRING:
|
|
1293
|
-
return datas.map((i) => String(i));
|
|
1294
|
-
|
|
1295
|
-
case KG__VAR_CONFIG_POSSIBILITY__VALUE_DATA_TYPE.DEFAULT:
|
|
1296
|
-
return datas;
|
|
1297
|
-
|
|
1298
|
-
default:
|
|
1299
|
-
return datas;
|
|
1300
|
-
}
|
|
1301
|
-
} catch (e) {
|
|
1302
|
-
// prettier-ignore
|
|
1303
|
-
____ERROR____(`| 控件的值非法 | ${controlType} 控件的值必须为数组类型.`, { formID: formID, value: _value0, varName: varName });
|
|
1304
|
-
return undefined;
|
|
1305
|
-
}
|
|
1306
|
-
}
|
|
1307
|
-
|
|
1308
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.SELECT: {
|
|
1309
|
-
if (isNil(_value0)) {
|
|
1310
|
-
return undefined;
|
|
1311
|
-
}
|
|
1312
|
-
|
|
1313
|
-
const varConfigPossibility = kgVar.getVarConfigPossibility({ varName: varName });
|
|
1314
|
-
|
|
1315
|
-
switch (varConfigPossibility?.val_data_type) {
|
|
1316
|
-
case KG__VAR_CONFIG_POSSIBILITY__VALUE_DATA_TYPE.NUMBER: {
|
|
1317
|
-
const _value = Number(_value0);
|
|
1318
|
-
|
|
1319
|
-
if (Number.isNaN(_value)) {
|
|
1320
|
-
// prettier-ignore
|
|
1321
|
-
____ERROR____(`| 控件的值非法 | ${controlType} 控件的值必须为数字类型.`, { VarConfigPossibility: varConfigPossibility, formID: formID, value: _value0, varName: varName });
|
|
1322
|
-
return undefined;
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
return _value;
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
|
-
case KG__VAR_CONFIG_POSSIBILITY__VALUE_DATA_TYPE.BOOLEAN: {
|
|
1329
|
-
if (_value0 === true || _value0 === 1 || _value0 === '1') {
|
|
1330
|
-
return true;
|
|
1331
|
-
}
|
|
1332
|
-
|
|
1333
|
-
if (_value0 === false || _value0 === 0 || _value0 === '0') {
|
|
1334
|
-
return false;
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
if (typeof _value0 === 'string' && _value0.toUpperCase() === 'TRUE') {
|
|
1338
|
-
return true;
|
|
1339
|
-
}
|
|
1340
|
-
|
|
1341
|
-
if (typeof _value0 === 'string' && _value0.toUpperCase() === 'FALSE') {
|
|
1342
|
-
return false;
|
|
1343
|
-
}
|
|
1344
|
-
|
|
1345
|
-
return Boolean(_value0);
|
|
1346
|
-
}
|
|
1347
|
-
|
|
1348
|
-
case KG__VAR_CONFIG_POSSIBILITY__VALUE_DATA_TYPE.STRING: {
|
|
1349
|
-
return String(_value0);
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1352
|
-
case KG__VAR_CONFIG_POSSIBILITY__VALUE_DATA_TYPE.DEFAULT: {
|
|
1353
|
-
return _value0;
|
|
1354
|
-
}
|
|
1355
|
-
}
|
|
1356
|
-
|
|
1357
|
-
break;
|
|
1358
|
-
}
|
|
1359
|
-
|
|
1360
|
-
default: {
|
|
1361
|
-
return _value0;
|
|
1362
|
-
}
|
|
1363
|
-
}
|
|
1364
|
-
}
|
|
1365
|
-
|
|
1366
|
-
/**
|
|
1367
|
-
* 计算某个列表数据的文本.
|
|
1368
|
-
*
|
|
1369
|
-
* <p>
|
|
1370
|
-
* labelColumn 可以是一个 JS 表达式, 组件库会解析该表达式, 并得到真正的值. 比如表达式 \`${row.id}\` 表示获取该行的 id 列的值. 表达式中可以使用下列变量:
|
|
1371
|
-
* <ul>
|
|
1372
|
-
* <li>row: 表示该行数据,</li>
|
|
1373
|
-
* </ul>
|
|
1374
|
-
* </p>
|
|
1375
|
-
*
|
|
1376
|
-
* @param row 该行数据.
|
|
1377
|
-
* @param labelColumn 文本对应的字段或者表达式.
|
|
1378
|
-
* @param valueColumn 数据对应的字段或者表达式.
|
|
1379
|
-
*/
|
|
1380
|
-
public static evaluateVarConfigPossibilityLabel(row: any, labelColumn: string, valueColumn: string): string {
|
|
1381
|
-
if (!row || !isObjectLike(row) || !labelColumn || typeof labelColumn !== 'string' || typeof valueColumn !== 'string') {
|
|
1382
|
-
return '';
|
|
1383
|
-
}
|
|
1384
|
-
|
|
1385
|
-
const labelExpression = (() => {
|
|
1386
|
-
// 如果以 `${ 开头并且以 }` 结尾, 表示是一个 javascript 的模板字符串, 直接解析,
|
|
1387
|
-
// 否则, 表示是一个简单的字段名, 需要先拼接成模板字符串, 再解析,
|
|
1388
|
-
|
|
1389
|
-
if (labelColumn.startsWith('`${') || labelColumn.endsWith('}`')) {
|
|
1390
|
-
if (!labelColumn.startsWith('`${') || !labelColumn.endsWith('}`')) {
|
|
1391
|
-
// prettier-ignore
|
|
1392
|
-
____ERROR____(`KgUtil.evaluateVarConfigPossibilityLabel() | 获取列表数据文本失败, 表达式的格式错误: ${labelColumn}.`, { labelColumn: labelColumn, row: row });
|
|
1393
|
-
console.error(`KgUtil.evaluateVarConfigPossibilityLabel() | 获取列表数据文本失败, 表达式的格式错误: ${labelColumn}.`);
|
|
1394
|
-
return '`${null}`';
|
|
1395
|
-
}
|
|
1396
|
-
return labelColumn;
|
|
1397
|
-
} else {
|
|
1398
|
-
return '`${row.' + labelColumn + '}`';
|
|
1399
|
-
}
|
|
1400
|
-
})();
|
|
1401
|
-
|
|
1402
|
-
let valueExpression = (() => {
|
|
1403
|
-
// 如果以 `${ 开头并且以 ` 结尾, 表示是一个 javascript 的模板字符串, 直接解析,
|
|
1404
|
-
// 否则, 表示是一个简单的字段名, 需要先拼接成模板字符串, 再解析,
|
|
1405
|
-
|
|
1406
|
-
if (valueColumn.startsWith('`${') || valueColumn.endsWith('`')) {
|
|
1407
|
-
if (!valueColumn.startsWith('`${') || !valueColumn.endsWith('`')) {
|
|
1408
|
-
// prettier-ignore
|
|
1409
|
-
____ERROR____(`KgUtil.evaluateVarConfigPossibilityLabel() | 获取列表数据失败, 表达式的格式错误: ${valueColumn}.`, { valueColumn: valueColumn, row: row });
|
|
1410
|
-
console.error(`KgUtil.evaluateVarConfigPossibilityLabel() | 获取列表数据失败, 表达式的格式错误: ${valueColumn}.`);
|
|
1411
|
-
return '`${null}`';
|
|
1412
|
-
}
|
|
1413
|
-
return valueColumn;
|
|
1414
|
-
} else {
|
|
1415
|
-
return '`${row.' + valueColumn + '}`';
|
|
1416
|
-
}
|
|
1417
|
-
})();
|
|
1418
|
-
|
|
1419
|
-
// 如果描述列有值, 则返回描述列的值, 如果描述列没有值, 则返回数据列的值,
|
|
1420
|
-
const expression = '`${' + `(${labelExpression.slice(3, -2)}) ?? (${valueExpression.slice(3, -2)}) ?? '' ` + '}`';
|
|
1421
|
-
// prettier-ignore
|
|
1422
|
-
____DEBUG____('KgUtil.evaluateVarConfigPossibilityLabel() | 获取列表数据文本.', { expression: expression, labelColumn: labelColumn, labelExpression: labelExpression, row: row });
|
|
1423
|
-
|
|
1424
|
-
try {
|
|
1425
|
-
return eval(expression);
|
|
1426
|
-
} catch {
|
|
1427
|
-
____ERROR____('KgUtil.evaluateVarConfigPossibilityLabel() | 获取列表数据文本失败.', { expression: expression, labelColumn: labelColumn, row: row });
|
|
1428
|
-
}
|
|
1429
|
-
|
|
1430
|
-
return '';
|
|
1431
|
-
}
|
|
1432
|
-
|
|
1433
|
-
/**
|
|
1434
|
-
* 根据控件类型, 将任意的高级查询操作符(可能非法)转换为合法的值.
|
|
1435
|
-
*
|
|
1436
|
-
* @param param.formID 界面标识.
|
|
1437
|
-
* @param param.value 原始的高级查询操作符.
|
|
1438
|
-
* @param param.varName 变量名称.
|
|
1439
|
-
* @return {} 转换后的合法的值.
|
|
1440
|
-
*/
|
|
1441
|
-
public static transformFormItemDynamicQueryOperator(param: { formID: string; value: string | null | undefined; varName: string }): string {
|
|
1442
|
-
const { formID, value, varName } = param ?? {};
|
|
1443
|
-
|
|
1444
|
-
const kgVar = useKgVar(formID);
|
|
1445
|
-
|
|
1446
|
-
const varConfigControl = kgVar.getVarConfigControl({ buttonType: KG__VAR_BUTTON__TYPE.SEARCH, varName: varName });
|
|
1447
|
-
|
|
1448
|
-
/**
|
|
1449
|
-
* 没有 VarConfigControl 数据时, 默认的控件类型为 {@link KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.INPUT}
|
|
1450
|
-
*/
|
|
1451
|
-
const _ctrl_typ = varConfigControl?.ctrl_typ || KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.INPUT;
|
|
1452
|
-
|
|
1453
|
-
switch (_ctrl_typ) {
|
|
1454
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.INPUT: {
|
|
1455
|
-
switch (value) {
|
|
1456
|
-
case KG.DYNAMIC_QUERY_OPERATOR__EQ:
|
|
1457
|
-
case KG.DYNAMIC_QUERY_OPERATOR__NE:
|
|
1458
|
-
case KG.DYNAMIC_QUERY_OPERATOR__LT:
|
|
1459
|
-
case KG.DYNAMIC_QUERY_OPERATOR__LTE:
|
|
1460
|
-
case KG.DYNAMIC_QUERY_OPERATOR__GT:
|
|
1461
|
-
case KG.DYNAMIC_QUERY_OPERATOR__GTE:
|
|
1462
|
-
case KG.DYNAMIC_QUERY_OPERATOR__START_WITH:
|
|
1463
|
-
case KG.DYNAMIC_QUERY_OPERATOR__END_WITH:
|
|
1464
|
-
case KG.DYNAMIC_QUERY_OPERATOR__CONTAIN:
|
|
1465
|
-
case KG.DYNAMIC_QUERY_OPERATOR__EMPTY:
|
|
1466
|
-
case KG.DYNAMIC_QUERY_OPERATOR__NOT_EMPTY:
|
|
1467
|
-
return value;
|
|
1468
|
-
|
|
1469
|
-
default:
|
|
1470
|
-
return KG.DYNAMIC_QUERY_OPERATOR__EQ;
|
|
1471
|
-
}
|
|
1472
|
-
}
|
|
1473
|
-
|
|
1474
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.INPUT_PASSWORD:
|
|
1475
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.TEXT_AREA: {
|
|
1476
|
-
switch (value) {
|
|
1477
|
-
case KG.DYNAMIC_QUERY_OPERATOR__EQ:
|
|
1478
|
-
case KG.DYNAMIC_QUERY_OPERATOR__NE:
|
|
1479
|
-
case KG.DYNAMIC_QUERY_OPERATOR__START_WITH:
|
|
1480
|
-
case KG.DYNAMIC_QUERY_OPERATOR__END_WITH:
|
|
1481
|
-
case KG.DYNAMIC_QUERY_OPERATOR__CONTAIN:
|
|
1482
|
-
case KG.DYNAMIC_QUERY_OPERATOR__EMPTY:
|
|
1483
|
-
case KG.DYNAMIC_QUERY_OPERATOR__NOT_EMPTY:
|
|
1484
|
-
return value;
|
|
1485
|
-
|
|
1486
|
-
default:
|
|
1487
|
-
return KG.DYNAMIC_QUERY_OPERATOR__EQ;
|
|
1488
|
-
}
|
|
1489
|
-
}
|
|
1490
|
-
|
|
1491
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.INPUT_NUMBER:
|
|
1492
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_DATE:
|
|
1493
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_TIME:
|
|
1494
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_DATETIME:
|
|
1495
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_WEEK:
|
|
1496
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_MONTH:
|
|
1497
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_YEAR: {
|
|
1498
|
-
switch (value) {
|
|
1499
|
-
case KG.DYNAMIC_QUERY_OPERATOR__EQ:
|
|
1500
|
-
case KG.DYNAMIC_QUERY_OPERATOR__NE:
|
|
1501
|
-
case KG.DYNAMIC_QUERY_OPERATOR__LT:
|
|
1502
|
-
case KG.DYNAMIC_QUERY_OPERATOR__LTE:
|
|
1503
|
-
case KG.DYNAMIC_QUERY_OPERATOR__GT:
|
|
1504
|
-
case KG.DYNAMIC_QUERY_OPERATOR__GTE:
|
|
1505
|
-
case KG.DYNAMIC_QUERY_OPERATOR__EMPTY:
|
|
1506
|
-
case KG.DYNAMIC_QUERY_OPERATOR__NOT_EMPTY:
|
|
1507
|
-
return value;
|
|
1508
|
-
|
|
1509
|
-
default:
|
|
1510
|
-
return KG.DYNAMIC_QUERY_OPERATOR__EQ;
|
|
1511
|
-
}
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.CHECKBOX:
|
|
1515
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.SWITCH:
|
|
1516
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.SELECT:
|
|
1517
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.RADIO_GROUP: {
|
|
1518
|
-
switch (value) {
|
|
1519
|
-
case KG.DYNAMIC_QUERY_OPERATOR__EQ:
|
|
1520
|
-
case KG.DYNAMIC_QUERY_OPERATOR__NE:
|
|
1521
|
-
case KG.DYNAMIC_QUERY_OPERATOR__EMPTY:
|
|
1522
|
-
case KG.DYNAMIC_QUERY_OPERATOR__NOT_EMPTY:
|
|
1523
|
-
return value;
|
|
1524
|
-
|
|
1525
|
-
default:
|
|
1526
|
-
return KG.DYNAMIC_QUERY_OPERATOR__EQ;
|
|
1527
|
-
}
|
|
1528
|
-
}
|
|
1529
|
-
|
|
1530
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.CHECKBOX_GROUP:
|
|
1531
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.SELECT_MULTIPLE: {
|
|
1532
|
-
switch (value) {
|
|
1533
|
-
case KG.DYNAMIC_QUERY_OPERATOR__EMPTY:
|
|
1534
|
-
case KG.DYNAMIC_QUERY_OPERATOR__NOT_EMPTY:
|
|
1535
|
-
return value;
|
|
1536
|
-
|
|
1537
|
-
default:
|
|
1538
|
-
return KG.DYNAMIC_QUERY_OPERATOR__IN;
|
|
1539
|
-
}
|
|
1540
|
-
}
|
|
1541
|
-
|
|
1542
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_DATE_RANGE:
|
|
1543
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_TIME_RANGE:
|
|
1544
|
-
case KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_DATETIME_RANGE: {
|
|
1545
|
-
switch (value) {
|
|
1546
|
-
case KG.DYNAMIC_QUERY_OPERATOR__EMPTY:
|
|
1547
|
-
case KG.DYNAMIC_QUERY_OPERATOR__NOT_EMPTY:
|
|
1548
|
-
return value;
|
|
1549
|
-
|
|
1550
|
-
default:
|
|
1551
|
-
return KG.DYNAMIC_QUERY_OPERATOR__BETWEEN;
|
|
1552
|
-
}
|
|
1553
|
-
}
|
|
1554
|
-
|
|
1555
|
-
default: {
|
|
1556
|
-
return KG.DYNAMIC_QUERY_OPERATOR__EQ;
|
|
1557
|
-
}
|
|
1558
|
-
}
|
|
1559
|
-
}
|
|
1560
|
-
|
|
1561
|
-
/**
|
|
1562
|
-
* 根据控件类型获取高级查询操作符的下拉列表.
|
|
1563
|
-
* @param controlType 控件类型.
|
|
1564
|
-
*/
|
|
1565
|
-
public static getDynamicQueryOperatorSelectOptions(controlType: string | null | undefined): any {
|
|
1566
|
-
const kg = useKg();
|
|
1567
|
-
|
|
1568
|
-
let _controlType = KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.INPUT;
|
|
1569
|
-
|
|
1570
|
-
if (!!controlType) {
|
|
1571
|
-
_controlType = controlType;
|
|
1572
|
-
}
|
|
1573
|
-
|
|
1574
|
-
return (
|
|
1575
|
-
<>
|
|
1576
|
-
{[
|
|
1577
|
-
KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.INPUT,
|
|
1578
|
-
KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.INPUT_PASSWORD,
|
|
1579
|
-
KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.INPUT_NUMBER,
|
|
1580
|
-
KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.TEXT_AREA,
|
|
1581
|
-
KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_DATE,
|
|
1582
|
-
KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_TIME,
|
|
1583
|
-
KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_DATETIME,
|
|
1584
|
-
KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_WEEK,
|
|
1585
|
-
KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_MONTH,
|
|
1586
|
-
KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_YEAR,
|
|
1587
|
-
KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.CHECKBOX,
|
|
1588
|
-
KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.SWITCH,
|
|
1589
|
-
KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.SELECT,
|
|
1590
|
-
KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.RADIO_GROUP,
|
|
1591
|
-
].includes(_controlType) && (
|
|
1592
|
-
<>
|
|
1593
|
-
<Select.Option value={KG.DYNAMIC_QUERY_OPERATOR__EQ}>
|
|
1594
|
-
<span
|
|
1595
|
-
class="code"
|
|
1596
|
-
title={kg.t('kg.KgSearchConfigModal.EQ-desc')}
|
|
1597
|
-
>
|
|
1598
|
-
{kg.t('kg.KgSearchConfigModal.EQ')}
|
|
1599
|
-
</span>
|
|
1600
|
-
<span class="desc">{kg.t('kg.KgSearchConfigModal.EQ-desc')}</span>
|
|
1601
|
-
</Select.Option>
|
|
1602
|
-
<Select.Option value={KG.DYNAMIC_QUERY_OPERATOR__NE}>
|
|
1603
|
-
<span
|
|
1604
|
-
class="code"
|
|
1605
|
-
title={kg.t('kg.KgSearchConfigModal.NE-desc')}
|
|
1606
|
-
>
|
|
1607
|
-
{kg.t('kg.KgSearchConfigModal.NE')}
|
|
1608
|
-
</span>
|
|
1609
|
-
<span class="desc">{kg.t('kg.KgSearchConfigModal.NE-desc')}</span>
|
|
1610
|
-
</Select.Option>
|
|
1611
|
-
</>
|
|
1612
|
-
)}
|
|
1613
|
-
|
|
1614
|
-
{[
|
|
1615
|
-
KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.INPUT,
|
|
1616
|
-
KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.INPUT_NUMBER,
|
|
1617
|
-
KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_DATE,
|
|
1618
|
-
KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_TIME,
|
|
1619
|
-
KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_DATETIME,
|
|
1620
|
-
KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_WEEK,
|
|
1621
|
-
KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_MONTH,
|
|
1622
|
-
KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_YEAR,
|
|
1623
|
-
].includes(_controlType) && (
|
|
1624
|
-
<>
|
|
1625
|
-
<Select.Option value={KG.DYNAMIC_QUERY_OPERATOR__GT}>
|
|
1626
|
-
<span
|
|
1627
|
-
class="code"
|
|
1628
|
-
title={kg.t('kg.KgSearchConfigModal.GT-desc')}
|
|
1629
|
-
>
|
|
1630
|
-
{kg.t('kg.KgSearchConfigModal.GT')}
|
|
1631
|
-
</span>
|
|
1632
|
-
<span class="desc">{kg.t('kg.KgSearchConfigModal.GT-desc')}</span>
|
|
1633
|
-
</Select.Option>
|
|
1634
|
-
<Select.Option value={KG.DYNAMIC_QUERY_OPERATOR__GTE}>
|
|
1635
|
-
<span
|
|
1636
|
-
class="code"
|
|
1637
|
-
title={kg.t('kg.KgSearchConfigModal.GTE-desc')}
|
|
1638
|
-
>
|
|
1639
|
-
{kg.t('kg.KgSearchConfigModal.GTE')}
|
|
1640
|
-
</span>
|
|
1641
|
-
<span class="desc">{kg.t('kg.KgSearchConfigModal.GTE-desc')}</span>
|
|
1642
|
-
</Select.Option>
|
|
1643
|
-
<Select.Option value={KG.DYNAMIC_QUERY_OPERATOR__LT}>
|
|
1644
|
-
<span
|
|
1645
|
-
class="code"
|
|
1646
|
-
title={kg.t('kg.KgSearchConfigModal.LT-desc')}
|
|
1647
|
-
>
|
|
1648
|
-
{kg.t('kg.KgSearchConfigModal.LT')}
|
|
1649
|
-
</span>
|
|
1650
|
-
<span class="desc">{kg.t('kg.KgSearchConfigModal.LT-desc')}</span>
|
|
1651
|
-
</Select.Option>
|
|
1652
|
-
<Select.Option value={KG.DYNAMIC_QUERY_OPERATOR__LTE}>
|
|
1653
|
-
<span
|
|
1654
|
-
class="code"
|
|
1655
|
-
title={kg.t('kg.KgSearchConfigModal.LTE-desc')}
|
|
1656
|
-
>
|
|
1657
|
-
{kg.t('kg.KgSearchConfigModal.LTE')}
|
|
1658
|
-
</span>
|
|
1659
|
-
<span class="desc">{kg.t('kg.KgSearchConfigModal.LTE-desc')}</span>
|
|
1660
|
-
</Select.Option>
|
|
1661
|
-
</>
|
|
1662
|
-
)}
|
|
1663
|
-
|
|
1664
|
-
{[KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.INPUT, KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.INPUT_PASSWORD, KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.TEXT_AREA].includes(_controlType) && (
|
|
1665
|
-
<>
|
|
1666
|
-
<Select.Option value={KG.DYNAMIC_QUERY_OPERATOR__START_WITH}>
|
|
1667
|
-
<span
|
|
1668
|
-
class="code"
|
|
1669
|
-
title={kg.t('kg.KgSearchConfigModal.START_WITH-desc')}
|
|
1670
|
-
>
|
|
1671
|
-
{kg.t('kg.KgSearchConfigModal.START_WITH')}
|
|
1672
|
-
</span>
|
|
1673
|
-
<span class="desc">{kg.t('kg.KgSearchConfigModal.START_WITH-desc')}</span>
|
|
1674
|
-
</Select.Option>
|
|
1675
|
-
<Select.Option value={KG.DYNAMIC_QUERY_OPERATOR__END_WITH}>
|
|
1676
|
-
<span
|
|
1677
|
-
class="code"
|
|
1678
|
-
title={kg.t('kg.KgSearchConfigModal.END_WITH-desc')}
|
|
1679
|
-
>
|
|
1680
|
-
{kg.t('kg.KgSearchConfigModal.END_WITH')}
|
|
1681
|
-
</span>
|
|
1682
|
-
<span class="desc">{kg.t('kg.KgSearchConfigModal.END_WITH-desc')}</span>
|
|
1683
|
-
</Select.Option>
|
|
1684
|
-
<Select.Option value={KG.DYNAMIC_QUERY_OPERATOR__CONTAIN}>
|
|
1685
|
-
<span
|
|
1686
|
-
class="code"
|
|
1687
|
-
title={kg.t('kg.KgSearchConfigModal.CONTAIN-desc')}
|
|
1688
|
-
>
|
|
1689
|
-
{kg.t('kg.KgSearchConfigModal.CONTAIN')}
|
|
1690
|
-
</span>
|
|
1691
|
-
<span class="desc">{kg.t('kg.KgSearchConfigModal.CONTAIN-desc')}</span>
|
|
1692
|
-
</Select.Option>
|
|
1693
|
-
</>
|
|
1694
|
-
)}
|
|
1695
|
-
|
|
1696
|
-
{[KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.CHECKBOX_GROUP, KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.SELECT_MULTIPLE].includes(_controlType) && (
|
|
1697
|
-
<>
|
|
1698
|
-
<Select.Option value={KG.DYNAMIC_QUERY_OPERATOR__IN}>
|
|
1699
|
-
<span
|
|
1700
|
-
class="code"
|
|
1701
|
-
title={kg.t('kg.KgSearchConfigModal.IN-desc')}
|
|
1702
|
-
>
|
|
1703
|
-
{kg.t('kg.KgSearchConfigModal.IN')}
|
|
1704
|
-
</span>
|
|
1705
|
-
<span class="desc">{kg.t('kg.KgSearchConfigModal.IN-desc')}</span>
|
|
1706
|
-
</Select.Option>
|
|
1707
|
-
</>
|
|
1708
|
-
)}
|
|
1709
|
-
|
|
1710
|
-
{[KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_DATE_RANGE, KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_TIME_RANGE, KG.VAR_CONFIG_CONTROL.CONTROL_TYPE.DATE_DATETIME_RANGE].includes(_controlType) && (
|
|
1711
|
-
<>
|
|
1712
|
-
<Select.Option value={KG.DYNAMIC_QUERY_OPERATOR__BETWEEN}>
|
|
1713
|
-
<span
|
|
1714
|
-
class="code"
|
|
1715
|
-
title={kg.t('kg.KgSearchConfigModal.BETWEEN-desc')}
|
|
1716
|
-
>
|
|
1717
|
-
{kg.t('kg.KgSearchConfigModal.BETWEEN')}
|
|
1718
|
-
</span>
|
|
1719
|
-
<span class="desc">{kg.t('kg.KgSearchConfigModal.BETWEEN-desc')}</span>
|
|
1720
|
-
</Select.Option>
|
|
1721
|
-
</>
|
|
1722
|
-
)}
|
|
1723
|
-
|
|
1724
|
-
<Select.Option value={KG.DYNAMIC_QUERY_OPERATOR__EMPTY}>
|
|
1725
|
-
<span
|
|
1726
|
-
class="code"
|
|
1727
|
-
title={kg.t('kg.KgSearchConfigModal.EMPTY-desc')}
|
|
1728
|
-
>
|
|
1729
|
-
{kg.t('kg.KgSearchConfigModal.EMPTY')}
|
|
1730
|
-
</span>
|
|
1731
|
-
<span class="desc">{kg.t('kg.KgSearchConfigModal.EMPTY-desc')}</span>
|
|
1732
|
-
</Select.Option>
|
|
1733
|
-
|
|
1734
|
-
<Select.Option value={KG.DYNAMIC_QUERY_OPERATOR__NOT_EMPTY}>
|
|
1735
|
-
<span
|
|
1736
|
-
class="code"
|
|
1737
|
-
title={kg.t('kg.KgSearchConfigModal.NOT_EMPTY-desc')}
|
|
1738
|
-
>
|
|
1739
|
-
{kg.t('kg.KgSearchConfigModal.NOT_EMPTY')}
|
|
1740
|
-
</span>
|
|
1741
|
-
<span class="desc">{kg.t('kg.KgSearchConfigModal.NOT_EMPTY-desc')}</span>
|
|
1742
|
-
</Select.Option>
|
|
1743
|
-
</>
|
|
1744
|
-
);
|
|
1745
|
-
}
|
|
1746
|
-
|
|
1747
|
-
/**
|
|
1748
|
-
* 如果属性值是动态参数值 {@link KG__DYNAMIC_PARAM}, 则给属性值的花括号里面的前后加上特殊字符 #, 防止它被解析成实际的值.
|
|
1749
|
-
*
|
|
1750
|
-
* @param params
|
|
1751
|
-
*/
|
|
1752
|
-
public static insertHashToDynamicQueryParams(params: any): void {
|
|
1753
|
-
if (!params) {
|
|
1754
|
-
return;
|
|
1755
|
-
}
|
|
1756
|
-
|
|
1757
|
-
if (!isObjectLike(params)) {
|
|
1758
|
-
return;
|
|
1759
|
-
}
|
|
1760
|
-
|
|
1761
|
-
Object.keys(params).forEach((key) => {
|
|
1762
|
-
const value = params[key];
|
|
1763
|
-
|
|
1764
|
-
if (value && typeof value === 'string') {
|
|
1765
|
-
Object.keys(KG__DYNAMIC_PARAM).forEach((dynamicParamKey) => {
|
|
1766
|
-
const dynamicParamValue = KG__DYNAMIC_PARAM[dynamicParamKey as keyof typeof KG__DYNAMIC_PARAM];
|
|
1767
|
-
if (value.includes(dynamicParamValue)) {
|
|
1768
|
-
params[key] = params[key].replaceAll(dynamicParamValue, KG__DYNAMIC_PARAM_HASH[dynamicParamKey as keyof typeof KG__DYNAMIC_PARAM_HASH]);
|
|
1769
|
-
}
|
|
1770
|
-
});
|
|
1771
|
-
}
|
|
1772
|
-
});
|
|
1773
|
-
}
|
|
1774
|
-
|
|
1775
|
-
//region 组装查询语句
|
|
1776
|
-
//----------------------------------------------------------------------------------------------------
|
|
1777
|
-
/**
|
|
1778
|
-
* <p>获取查询请求相关的请求头.</p>
|
|
1779
|
-
* <p>根据查询条件拼接 SQL 语句片段.</p>
|
|
1780
|
-
* <p>根据查询参数拼接 SQL, 格式如下: `WHERE ... ORDER BY ...`, 每一个片段会单独作为一个属性返回.</p>
|
|
1781
|
-
* <ul>
|
|
1782
|
-
* <li>如果 dynamicQueryOperatorModel 传值, 表示直接使用传入的 dynamicQueryOperatorModel 作为高级查询操作符.</li>
|
|
1783
|
-
* <li>如果 dynamicQueryOperatorModel 没有传值, 但是 formID 传值, 表示通过变量配置获取高级查询操作符.</li>
|
|
1784
|
-
* </ul>
|
|
1785
|
-
*
|
|
1786
|
-
* @param param.$dayjs dayjs.
|
|
1787
|
-
* @param param.dynamicQueryOperatorModel 各个字段的高级查询操作符.
|
|
1788
|
-
* @param param.formID 界面标识.
|
|
1789
|
-
* @param param.kgSearchFormID 查询条件的界面标识.
|
|
1790
|
-
* @param param.params 请求参数.
|
|
1791
|
-
*/
|
|
1792
|
-
public static getQueryHeaders(param: {
|
|
1793
|
-
$dayjs: typeof dayjs;
|
|
1794
|
-
dynamicQueryOperatorModel: Record<string, any> | null | undefined;
|
|
1795
|
-
formID: string | null | undefined;
|
|
1796
|
-
kgSearchFormID: string | null | undefined;
|
|
1797
|
-
params: Record<string, any> | null | undefined;
|
|
1798
|
-
}) {
|
|
1799
|
-
const { kgSearchFormID, formID, dynamicQueryOperatorModel, $dayjs } = param ?? {};
|
|
1800
|
-
|
|
1801
|
-
if (!kgSearchFormID && !dynamicQueryOperatorModel) {
|
|
1802
|
-
throw new Error('参数 kgSearchFormID 和 dynamicQueryOperatorModel 不能同时为空, 至少有一个必须传值.');
|
|
1803
|
-
}
|
|
1804
|
-
|
|
1805
|
-
let paramRecord = cloneDeep(toRaw(unref(param.params ?? {})));
|
|
1806
|
-
|
|
1807
|
-
// 参数不是一个对象,
|
|
1808
|
-
if (!paramRecord || !isObjectLike(paramRecord)) {
|
|
1809
|
-
return { operatorObjectJSON: '', orderBySql: '', sql: '', whereObjectJSON: '', whereSql: '', whereSql01: '', whereSql02: '', whereSql03: '', whereSql04: '', whereSql05: '' };
|
|
1810
|
-
}
|
|
1811
|
-
|
|
1812
|
-
// 特殊字段, 这些特殊字段的值不做处理, 保持原样
|
|
1813
|
-
const SPECIAL_KEY_LIST = ['pageNo', 'pageSize', 'column', 'order'];
|
|
1814
|
-
|
|
1815
|
-
const kg = useKg();
|
|
1816
|
-
const kgVar = formID ? useKgVar(formID) : null;
|
|
1817
|
-
const kgSearchKgVar = kgSearchFormID ? useKgVar(kgSearchFormID) : null;
|
|
1818
|
-
|
|
1819
|
-
const _dynamicQueryOperatorModel = dynamicQueryOperatorModel ?? kgSearchKgVar?.kgSearch?.dynamicQueryOperatorModel?.value;
|
|
1820
|
-
|
|
1821
|
-
// 该对象中, 每一个 key 表示字段名, 每一个 value 表示该字段对应的 SQL 片段,
|
|
1822
|
-
const paramRecord$QueryWhereSql: Record<string, any> = {};
|
|
1823
|
-
// 该对象中, 每一个 key 表示字段名, 每一个 value 表示该字段对应的解析后的值,
|
|
1824
|
-
const paramRecord$QueryObject: Record<string, any> = {};
|
|
1825
|
-
|
|
1826
|
-
for (const key of Object.keys(paramRecord).sort()) {
|
|
1827
|
-
// 特殊属性, 不放进 WHERE SQL 中
|
|
1828
|
-
if (SPECIAL_KEY_LIST.includes(key)) {
|
|
1829
|
-
continue;
|
|
1830
|
-
}
|
|
1831
|
-
|
|
1832
|
-
// 辅助属性, 用于业务逻辑, 不放进 WHERE SQL 中,
|
|
1833
|
-
if (key.endsWith('_obj')) {
|
|
1834
|
-
continue;
|
|
1835
|
-
}
|
|
1836
|
-
|
|
1837
|
-
const varProfileDetail = kgSearchFormID ? kgSearchKgVar?.store?.getVarProfileDetail(kgSearchFormID, key) : null;
|
|
1838
|
-
|
|
1839
|
-
const key01 = (() => {
|
|
1840
|
-
// 字段名称转换为下划线命名方式(snake_case)
|
|
1841
|
-
if (kgSearchFormID && varProfileDetail?.use_underscore_when_dynamic_query_flag !== 0) {
|
|
1842
|
-
return key
|
|
1843
|
-
.split('.')
|
|
1844
|
-
.map((i: string) => KgUtil.snakeCase(i))
|
|
1845
|
-
.join('.');
|
|
1846
|
-
}
|
|
1847
|
-
|
|
1848
|
-
return key;
|
|
1849
|
-
})();
|
|
1850
|
-
const value = paramRecord[key];
|
|
1851
|
-
const operator: string = (() => {
|
|
1852
|
-
// 未启用高级查询时, 操作符始终是「等于」,
|
|
1853
|
-
if (kg.option.KgSearch?.dynamicQuery?.on !== true || (kgSearchFormID && kgSearchKgVar?.kgSearch?.currentVarProfileMaster?.value?.dyn_flg !== 1)) {
|
|
1854
|
-
return KG.DYNAMIC_QUERY_OPERATOR__EQ;
|
|
1855
|
-
}
|
|
1856
|
-
|
|
1857
|
-
return _dynamicQueryOperatorModel?.[key] ?? KG.DYNAMIC_QUERY_OPERATOR__EQ;
|
|
1858
|
-
})();
|
|
1859
|
-
|
|
1860
|
-
switch01: switch (true) {
|
|
1861
|
-
//region 日期
|
|
1862
|
-
//----------------------------------------------------------------------------------------------------
|
|
1863
|
-
case !!$dayjs && $dayjs.isDayjs(value): {
|
|
1864
|
-
let _stringValue = '';
|
|
1865
|
-
|
|
1866
|
-
const _value = value as Dayjs;
|
|
1867
|
-
_stringValue = kgSearchFormID
|
|
1868
|
-
? KgUtil.parseParamsFromDayjs({
|
|
1869
|
-
formID: kgSearchFormID,
|
|
1870
|
-
key: key,
|
|
1871
|
-
value: _value,
|
|
1872
|
-
})
|
|
1873
|
-
: _value.format('YYYY-MM-DD HH:mm:ss');
|
|
1874
|
-
|
|
1875
|
-
switch (operator) {
|
|
1876
|
-
case KG.DYNAMIC_QUERY_OPERATOR__NE: {
|
|
1877
|
-
let _leftStringValue = _stringValue;
|
|
1878
|
-
let _rightStringValue = '';
|
|
1879
|
-
|
|
1880
|
-
switch (true) {
|
|
1881
|
-
// YYYY-MM-DD HH:mm:ss
|
|
1882
|
-
case /\d\d-\d\d-\d\d \d\d:\d\d:\d\d/.test(_leftStringValue): {
|
|
1883
|
-
_rightStringValue = _value.add(1, 'second').format('YYYY-MM-DD HH:mm:ss');
|
|
1884
|
-
break;
|
|
1885
|
-
}
|
|
1886
|
-
|
|
1887
|
-
// YYYY-MM-DD
|
|
1888
|
-
case /\d\d-\d\d-\d\d/.test(_leftStringValue): {
|
|
1889
|
-
_leftStringValue = `${_leftStringValue} 00:00:00`;
|
|
1890
|
-
_rightStringValue = _value.add(1, 'day').format('YYYY-MM-DD 00:00:00');
|
|
1891
|
-
break;
|
|
1892
|
-
}
|
|
1893
|
-
|
|
1894
|
-
// HH:mm:ss
|
|
1895
|
-
case /\d\d:\d\d:\d\d/.test(_leftStringValue): {
|
|
1896
|
-
_leftStringValue = _value.format('1900-01-01 HH:mm:ss');
|
|
1897
|
-
_rightStringValue = _value.add(1, 'second').format('1900-01-01 HH:mm:ss');
|
|
1898
|
-
break;
|
|
1899
|
-
}
|
|
1900
|
-
|
|
1901
|
-
default: {
|
|
1902
|
-
throw new Error('KgUtil.parseParamsForDynamicQuery() | 日期格式有误.');
|
|
1903
|
-
}
|
|
1904
|
-
}
|
|
1905
|
-
|
|
1906
|
-
_stringValue = `(("${key01}" < '${_leftStringValue}') OR ("${key01}" >= '${_rightStringValue}'))`;
|
|
1907
|
-
|
|
1908
|
-
break;
|
|
1909
|
-
}
|
|
1910
|
-
|
|
1911
|
-
case KG.DYNAMIC_QUERY_OPERATOR__LT: {
|
|
1912
|
-
let _leftStringValue = _stringValue;
|
|
1913
|
-
|
|
1914
|
-
switch (true) {
|
|
1915
|
-
// YYYY-MM-DD HH:mm:ss
|
|
1916
|
-
case /\d\d-\d\d-\d\d \d\d:\d\d:\d\d/.test(_leftStringValue): {
|
|
1917
|
-
break;
|
|
1918
|
-
}
|
|
1919
|
-
|
|
1920
|
-
// YYYY-MM-DD
|
|
1921
|
-
case /\d\d-\d\d-\d\d/.test(_leftStringValue): {
|
|
1922
|
-
_leftStringValue = `${_leftStringValue} 00:00:00`;
|
|
1923
|
-
break;
|
|
1924
|
-
}
|
|
1925
|
-
|
|
1926
|
-
// HH:mm:ss
|
|
1927
|
-
case /\d\d:\d\d:\d\d/.test(_leftStringValue): {
|
|
1928
|
-
_leftStringValue = `1900-01-01 ${_leftStringValue}`;
|
|
1929
|
-
break;
|
|
1930
|
-
}
|
|
1931
|
-
|
|
1932
|
-
default: {
|
|
1933
|
-
throw new Error('KgUtil.parseParamsForDynamicQuery() | 日期格式有误.');
|
|
1934
|
-
}
|
|
1935
|
-
}
|
|
1936
|
-
|
|
1937
|
-
_stringValue = `("${key01}" < '${_leftStringValue}')`;
|
|
1938
|
-
|
|
1939
|
-
break;
|
|
1940
|
-
}
|
|
1941
|
-
|
|
1942
|
-
case KG.DYNAMIC_QUERY_OPERATOR__LTE: {
|
|
1943
|
-
let _leftStringValue = _stringValue;
|
|
1944
|
-
let _rightStringValue = '';
|
|
1945
|
-
|
|
1946
|
-
switch (true) {
|
|
1947
|
-
// YYYY-MM-DD HH:mm:ss
|
|
1948
|
-
case /\d\d-\d\d-\d\d \d\d:\d\d:\d\d/.test(_leftStringValue): {
|
|
1949
|
-
_rightStringValue = _value.add(1, 'second').format('YYYY-MM-DD HH:mm:ss');
|
|
1950
|
-
break;
|
|
1951
|
-
}
|
|
1952
|
-
|
|
1953
|
-
// YYYY-MM-DD
|
|
1954
|
-
case /\d\d-\d\d-\d\d/.test(_leftStringValue): {
|
|
1955
|
-
_rightStringValue = _value.add(1, 'day').format('YYYY-MM-DD 00:00:00');
|
|
1956
|
-
break;
|
|
1957
|
-
}
|
|
1958
|
-
|
|
1959
|
-
// HH:mm:ss
|
|
1960
|
-
case /\d\d:\d\d:\d\d/.test(_leftStringValue): {
|
|
1961
|
-
_rightStringValue = _value.add(1, 'second').format('1900-01-01 HH:mm:ss');
|
|
1962
|
-
break;
|
|
1963
|
-
}
|
|
1964
|
-
|
|
1965
|
-
default: {
|
|
1966
|
-
throw new Error('KgUtil.parseParamsForDynamicQuery() | 日期格式有误.');
|
|
1967
|
-
}
|
|
1968
|
-
}
|
|
1969
|
-
|
|
1970
|
-
_stringValue = `("${key01}" < '${_rightStringValue}')`;
|
|
1971
|
-
|
|
1972
|
-
break;
|
|
1973
|
-
}
|
|
1974
|
-
|
|
1975
|
-
case KG.DYNAMIC_QUERY_OPERATOR__GT: {
|
|
1976
|
-
let _leftStringValue = _stringValue;
|
|
1977
|
-
let _rightStringValue = '';
|
|
1978
|
-
|
|
1979
|
-
switch (true) {
|
|
1980
|
-
// YYYY-MM-DD HH:mm:ss
|
|
1981
|
-
case /\d\d-\d\d-\d\d \d\d:\d\d:\d\d/.test(_leftStringValue): {
|
|
1982
|
-
_rightStringValue = _value.add(1, 'second').format('YYYY-MM-DD HH:mm:ss');
|
|
1983
|
-
break;
|
|
1984
|
-
}
|
|
1985
|
-
|
|
1986
|
-
// YYYY-MM-DD
|
|
1987
|
-
case /\d\d-\d\d-\d\d/.test(_leftStringValue): {
|
|
1988
|
-
_rightStringValue = _value.add(1, 'day').format('YYYY-MM-DD 00:00:00');
|
|
1989
|
-
break;
|
|
1990
|
-
}
|
|
1991
|
-
|
|
1992
|
-
// HH:mm:ss
|
|
1993
|
-
case /\d\d:\d\d:\d\d/.test(_leftStringValue): {
|
|
1994
|
-
_rightStringValue = _value.add(1, 'second').format('1900-01-01 HH:mm:ss');
|
|
1995
|
-
break;
|
|
1996
|
-
}
|
|
1997
|
-
|
|
1998
|
-
default: {
|
|
1999
|
-
throw new Error('KgUtil.parseParamsForDynamicQuery() | 日期格式有误.');
|
|
2000
|
-
}
|
|
2001
|
-
}
|
|
2002
|
-
|
|
2003
|
-
_stringValue = `("${key01}" >= '${_rightStringValue}')`;
|
|
2004
|
-
|
|
2005
|
-
break;
|
|
2006
|
-
}
|
|
2007
|
-
|
|
2008
|
-
case KG.DYNAMIC_QUERY_OPERATOR__GTE: {
|
|
2009
|
-
let _leftStringValue = _stringValue;
|
|
2010
|
-
|
|
2011
|
-
switch (true) {
|
|
2012
|
-
// YYYY-MM-DD HH:mm:ss
|
|
2013
|
-
case /\d\d-\d\d-\d\d \d\d:\d\d:\d\d/.test(_leftStringValue): {
|
|
2014
|
-
break;
|
|
2015
|
-
}
|
|
2016
|
-
|
|
2017
|
-
// YYYY-MM-DD
|
|
2018
|
-
case /\d\d-\d\d-\d\d/.test(_leftStringValue): {
|
|
2019
|
-
_leftStringValue = `${_leftStringValue} 00:00:00`;
|
|
2020
|
-
break;
|
|
2021
|
-
}
|
|
2022
|
-
|
|
2023
|
-
// HH:mm:ss
|
|
2024
|
-
case /\d\d:\d\d:\d\d/.test(_leftStringValue): {
|
|
2025
|
-
_leftStringValue = `1900-01-01 ${_leftStringValue}`;
|
|
2026
|
-
break;
|
|
2027
|
-
}
|
|
2028
|
-
|
|
2029
|
-
default: {
|
|
2030
|
-
throw new Error('KgUtil.parseParamsForDynamicQuery() | 日期格式有误.');
|
|
2031
|
-
}
|
|
2032
|
-
}
|
|
2033
|
-
|
|
2034
|
-
_stringValue = `("${key01}" >= '${_leftStringValue}')`;
|
|
2035
|
-
|
|
2036
|
-
break;
|
|
2037
|
-
}
|
|
2038
|
-
|
|
2039
|
-
case KG.DYNAMIC_QUERY_OPERATOR__EMPTY: {
|
|
2040
|
-
_stringValue = `("${key01}" IS NULL OR (TRIM(CONVERT(VARCHAR(MAX), "${key01}")) = ''))`;
|
|
2041
|
-
break;
|
|
2042
|
-
}
|
|
2043
|
-
|
|
2044
|
-
case KG.DYNAMIC_QUERY_OPERATOR__NOT_EMPTY: {
|
|
2045
|
-
_stringValue = `(NOT ("${key01}" IS NULL OR (TRIM(CONVERT(VARCHAR(MAX), "${key01}")) = '')))`;
|
|
2046
|
-
break;
|
|
2047
|
-
}
|
|
2048
|
-
|
|
2049
|
-
case KG.DYNAMIC_QUERY_OPERATOR__EQ:
|
|
2050
|
-
default: {
|
|
2051
|
-
let _leftStringValue = _stringValue;
|
|
2052
|
-
let _rightStringValue = '';
|
|
2053
|
-
|
|
2054
|
-
switch (true) {
|
|
2055
|
-
// YYYY-MM-DD HH:mm:ss
|
|
2056
|
-
case /\d\d-\d\d-\d\d \d\d:\d\d:\d\d/.test(_leftStringValue): {
|
|
2057
|
-
_rightStringValue = _value.add(1, 'second').format('YYYY-MM-DD HH:mm:ss');
|
|
2058
|
-
break;
|
|
2059
|
-
}
|
|
2060
|
-
|
|
2061
|
-
// YYYY-MM-DD
|
|
2062
|
-
case /\d\d-\d\d-\d\d/.test(_leftStringValue): {
|
|
2063
|
-
_leftStringValue = `${_leftStringValue} 00:00:00`;
|
|
2064
|
-
_rightStringValue = _value.add(1, 'day').format('YYYY-MM-DD 00:00:00');
|
|
2065
|
-
break;
|
|
2066
|
-
}
|
|
2067
|
-
|
|
2068
|
-
// HH:mm:ss
|
|
2069
|
-
case /\d\d:\d\d:\d\d/.test(_leftStringValue): {
|
|
2070
|
-
_leftStringValue = `1900-01-01 ${_leftStringValue}`;
|
|
2071
|
-
_rightStringValue = _value.add(1, 'second').format('1900-01-01 HH:mm:ss');
|
|
2072
|
-
break;
|
|
2073
|
-
}
|
|
2074
|
-
|
|
2075
|
-
default: {
|
|
2076
|
-
throw new Error('KgUtil.parseParamsForDynamicQuery() | 日期格式有误.');
|
|
2077
|
-
}
|
|
2078
|
-
}
|
|
2079
|
-
|
|
2080
|
-
_stringValue = `(("${key01}" >= '${_leftStringValue}') AND ("${key01}" < '${_rightStringValue}'))`;
|
|
2081
|
-
|
|
2082
|
-
break;
|
|
2083
|
-
}
|
|
2084
|
-
}
|
|
2085
|
-
|
|
2086
|
-
paramRecord$QueryWhereSql[key] = _stringValue;
|
|
2087
|
-
|
|
2088
|
-
break;
|
|
2089
|
-
}
|
|
2090
|
-
//endregion
|
|
2091
|
-
|
|
2092
|
-
//region 日期范围
|
|
2093
|
-
//----------------------------------------------------------------------------------------------------
|
|
2094
|
-
case !!$dayjs && isArray(value) && value.length === 2 && $dayjs.isDayjs(value[0]) && $dayjs.isDayjs(value[1]): {
|
|
2095
|
-
let _stringValue = '';
|
|
2096
|
-
|
|
2097
|
-
switch (operator) {
|
|
2098
|
-
case KG.DYNAMIC_QUERY_OPERATOR__EMPTY: {
|
|
2099
|
-
_stringValue = `("${key01}" IS NULL OR (TRIM(CONVERT(VARCHAR(MAX), "${key01}")) = ''))`;
|
|
2100
|
-
break;
|
|
2101
|
-
}
|
|
2102
|
-
|
|
2103
|
-
case KG.DYNAMIC_QUERY_OPERATOR__NOT_EMPTY: {
|
|
2104
|
-
_stringValue = `(NOT ("${key01}" IS NULL OR (TRIM(CONVERT(VARCHAR(MAX), "${key01}")) = '')))`;
|
|
2105
|
-
break;
|
|
2106
|
-
}
|
|
2107
|
-
|
|
2108
|
-
case KG.DYNAMIC_QUERY_OPERATOR__BETWEEN:
|
|
2109
|
-
default: {
|
|
2110
|
-
const _leftValue = value[0] as Dayjs;
|
|
2111
|
-
const _rightValue = value[1] as Dayjs;
|
|
2112
|
-
|
|
2113
|
-
// 左侧日期的字符串
|
|
2114
|
-
let _leftStringValue = KgUtil.parseParamsFromDayjs({ formID: kgSearchFormID, key: key, value: _leftValue });
|
|
2115
|
-
// 右侧日期的字符串
|
|
2116
|
-
let _rightStringValue = '';
|
|
2117
|
-
|
|
2118
|
-
switch (true) {
|
|
2119
|
-
// 左侧日期为空
|
|
2120
|
-
case !_leftStringValue: {
|
|
2121
|
-
_rightStringValue = KgUtil.parseParamsFromDayjs({ formID: kgSearchFormID, isPad: true, key: key, value: _rightValue });
|
|
2122
|
-
break;
|
|
2123
|
-
}
|
|
2124
|
-
|
|
2125
|
-
// 日期格式为 YYYY-MM-DD HH:mm:ss
|
|
2126
|
-
case /\d\d-\d\d-\d\d \d\d:\d\d:\d\d/.test(_leftStringValue): {
|
|
2127
|
-
if (_rightValue.isValid()) {
|
|
2128
|
-
_rightStringValue = _rightValue.add(1, 'second').format('YYYY-MM-DD HH:mm:ss');
|
|
2129
|
-
}
|
|
2130
|
-
break;
|
|
2131
|
-
}
|
|
2132
|
-
|
|
2133
|
-
// 日期格式为 YYYY-MM-DD
|
|
2134
|
-
case /\d\d-\d\d-\d\d/.test(_leftStringValue): {
|
|
2135
|
-
_leftStringValue = `${_leftStringValue} 00:00:00`;
|
|
2136
|
-
if (_rightValue.isValid()) {
|
|
2137
|
-
_rightStringValue = _rightValue.add(1, 'day').format('YYYY-MM-DD 00:00:00');
|
|
2138
|
-
}
|
|
2139
|
-
break;
|
|
2140
|
-
}
|
|
2141
|
-
|
|
2142
|
-
// 日期格式为 HH:mm:ss
|
|
2143
|
-
case /\d\d:\d\d:\d\d/.test(_leftStringValue): {
|
|
2144
|
-
_leftStringValue = `1900-01-01 ${_leftStringValue}`;
|
|
2145
|
-
if (_rightValue.isValid()) {
|
|
2146
|
-
_rightStringValue = _rightValue.add(1, 'second').format('1900-01-01 HH:mm:ss');
|
|
2147
|
-
}
|
|
2148
|
-
break;
|
|
2149
|
-
}
|
|
2150
|
-
}
|
|
2151
|
-
|
|
2152
|
-
if (_leftStringValue) {
|
|
2153
|
-
_stringValue += (() => {
|
|
2154
|
-
switch (kg.option.dbType!) {
|
|
2155
|
-
case KG.DB_TYPE.DM:
|
|
2156
|
-
case KG.DB_TYPE.MYSQL:
|
|
2157
|
-
case KG.DB_TYPE.ORACLE:
|
|
2158
|
-
case KG.DB_TYPE.POSTGRESQL:
|
|
2159
|
-
case KG.DB_TYPE.SQLITE:
|
|
2160
|
-
return `("${key01}" >= '${_leftStringValue}')`;
|
|
2161
|
-
|
|
2162
|
-
case KG.DB_TYPE.SQLSERVER:
|
|
2163
|
-
default:
|
|
2164
|
-
return `("${key01}" >= N'${_leftStringValue}')`;
|
|
2165
|
-
}
|
|
2166
|
-
})();
|
|
2167
|
-
}
|
|
2168
|
-
|
|
2169
|
-
if (_rightStringValue) {
|
|
2170
|
-
if (_stringValue) {
|
|
2171
|
-
_stringValue += ' AND ';
|
|
2172
|
-
}
|
|
2173
|
-
|
|
2174
|
-
_stringValue += (() => {
|
|
2175
|
-
switch (kg.option.dbType!) {
|
|
2176
|
-
case KG.DB_TYPE.DM:
|
|
2177
|
-
case KG.DB_TYPE.MYSQL:
|
|
2178
|
-
case KG.DB_TYPE.ORACLE:
|
|
2179
|
-
case KG.DB_TYPE.POSTGRESQL:
|
|
2180
|
-
case KG.DB_TYPE.SQLITE:
|
|
2181
|
-
return `("${key01}" < '${_rightStringValue}')`;
|
|
2182
|
-
|
|
2183
|
-
case KG.DB_TYPE.SQLSERVER:
|
|
2184
|
-
default:
|
|
2185
|
-
return `("${key01}" < N'${_rightStringValue}')`;
|
|
2186
|
-
}
|
|
2187
|
-
})();
|
|
2188
|
-
}
|
|
2189
|
-
break;
|
|
2190
|
-
}
|
|
2191
|
-
}
|
|
2192
|
-
|
|
2193
|
-
paramRecord$QueryWhereSql[key] = _stringValue;
|
|
2194
|
-
|
|
2195
|
-
break;
|
|
2196
|
-
}
|
|
2197
|
-
//endregion
|
|
2198
|
-
|
|
2199
|
-
//region array
|
|
2200
|
-
//----------------------------------------------------------------------------------------------------
|
|
2201
|
-
case Array.isArray(value): {
|
|
2202
|
-
let _stringValue = '';
|
|
2203
|
-
|
|
2204
|
-
switch (operator) {
|
|
2205
|
-
case KG.DYNAMIC_QUERY_OPERATOR__EMPTY: {
|
|
2206
|
-
_stringValue = `("${key01}" IS NULL OR (TRIM(CONVERT(VARCHAR(MAX), "${key01}")) = ''))`;
|
|
2207
|
-
break;
|
|
2208
|
-
}
|
|
2209
|
-
|
|
2210
|
-
case KG.DYNAMIC_QUERY_OPERATOR__NOT_EMPTY: {
|
|
2211
|
-
_stringValue = `(NOT ("${key01}" IS NULL OR (TRIM(CONVERT(VARCHAR(MAX), "${key01}")) = '')))`;
|
|
2212
|
-
break;
|
|
2213
|
-
}
|
|
2214
|
-
|
|
2215
|
-
case KG.DYNAMIC_QUERY_OPERATOR__IN:
|
|
2216
|
-
default: {
|
|
2217
|
-
if (value.length === 0) {
|
|
2218
|
-
paramRecord$QueryWhereSql[key] = undefined;
|
|
2219
|
-
break switch01;
|
|
2220
|
-
}
|
|
2221
|
-
|
|
2222
|
-
const _value = value
|
|
2223
|
-
.map((i: any) =>
|
|
2224
|
-
(() => {
|
|
2225
|
-
switch (kg.option.dbType!) {
|
|
2226
|
-
case KG.DB_TYPE.DM:
|
|
2227
|
-
case KG.DB_TYPE.MYSQL:
|
|
2228
|
-
case KG.DB_TYPE.ORACLE:
|
|
2229
|
-
case KG.DB_TYPE.POSTGRESQL:
|
|
2230
|
-
case KG.DB_TYPE.SQLITE:
|
|
2231
|
-
return `'${String(i)}'`;
|
|
2232
|
-
|
|
2233
|
-
case KG.DB_TYPE.SQLSERVER:
|
|
2234
|
-
default:
|
|
2235
|
-
return `N'${String(i)}'`;
|
|
2236
|
-
}
|
|
2237
|
-
})(),
|
|
2238
|
-
)
|
|
2239
|
-
.join(', ');
|
|
2240
|
-
|
|
2241
|
-
_stringValue = `("${key01}" IN (${_value}))`;
|
|
2242
|
-
break;
|
|
2243
|
-
}
|
|
2244
|
-
}
|
|
2245
|
-
|
|
2246
|
-
paramRecord$QueryWhereSql[key] = _stringValue;
|
|
2247
|
-
break;
|
|
2248
|
-
}
|
|
2249
|
-
//----------------------------------------------------------------------------------------------------
|
|
2250
|
-
//endregion
|
|
2251
|
-
|
|
2252
|
-
//region object
|
|
2253
|
-
//----------------------------------------------------------------------------------------------------
|
|
2254
|
-
case isObjectLike(value): {
|
|
2255
|
-
____ERROR____('不支持的参数类型.', { value });
|
|
2256
|
-
throw new Error('不支持的参数类型.');
|
|
2257
|
-
}
|
|
2258
|
-
//----------------------------------------------------------------------------------------------------
|
|
2259
|
-
//endregion
|
|
2260
|
-
|
|
2261
|
-
//region string
|
|
2262
|
-
//----------------------------------------------------------------------------------------------------
|
|
2263
|
-
case typeof value === 'string': {
|
|
2264
|
-
let _stringValue = '';
|
|
2265
|
-
|
|
2266
|
-
_stringValue = KgUtil.parseParamsFromString({ $dayjs: $dayjs, formID: formID, value: value, varName: key });
|
|
2267
|
-
|
|
2268
|
-
switch (operator) {
|
|
2269
|
-
case KG.DYNAMIC_QUERY_OPERATOR__NE: {
|
|
2270
|
-
// 空白字符
|
|
2271
|
-
if (value.trim() === '') {
|
|
2272
|
-
paramRecord$QueryWhereSql[key] = undefined;
|
|
2273
|
-
break switch01;
|
|
2274
|
-
}
|
|
2275
|
-
|
|
2276
|
-
_stringValue = (() => {
|
|
2277
|
-
switch (kg.option.dbType!) {
|
|
2278
|
-
case KG.DB_TYPE.DM:
|
|
2279
|
-
case KG.DB_TYPE.MYSQL:
|
|
2280
|
-
case KG.DB_TYPE.ORACLE:
|
|
2281
|
-
case KG.DB_TYPE.POSTGRESQL:
|
|
2282
|
-
case KG.DB_TYPE.SQLITE:
|
|
2283
|
-
return `("${key01}" <> '${_stringValue}')`;
|
|
2284
|
-
|
|
2285
|
-
case KG.DB_TYPE.SQLSERVER:
|
|
2286
|
-
default:
|
|
2287
|
-
return `("${key01}" <> N'${_stringValue}')`;
|
|
2288
|
-
}
|
|
2289
|
-
})();
|
|
2290
|
-
break;
|
|
2291
|
-
}
|
|
2292
|
-
|
|
2293
|
-
case KG.DYNAMIC_QUERY_OPERATOR__LT: {
|
|
2294
|
-
// 空白字符
|
|
2295
|
-
if (value.trim() === '') {
|
|
2296
|
-
paramRecord$QueryWhereSql[key] = undefined;
|
|
2297
|
-
break switch01;
|
|
2298
|
-
}
|
|
2299
|
-
|
|
2300
|
-
_stringValue = (() => {
|
|
2301
|
-
switch (kg.option.dbType!) {
|
|
2302
|
-
case KG.DB_TYPE.DM:
|
|
2303
|
-
case KG.DB_TYPE.MYSQL:
|
|
2304
|
-
case KG.DB_TYPE.ORACLE:
|
|
2305
|
-
case KG.DB_TYPE.POSTGRESQL:
|
|
2306
|
-
case KG.DB_TYPE.SQLITE:
|
|
2307
|
-
return `("${key01}" < '${_stringValue}')`;
|
|
2308
|
-
|
|
2309
|
-
case KG.DB_TYPE.SQLSERVER:
|
|
2310
|
-
default:
|
|
2311
|
-
return `("${key01}" < N'${_stringValue}')`;
|
|
2312
|
-
}
|
|
2313
|
-
})();
|
|
2314
|
-
break;
|
|
2315
|
-
}
|
|
2316
|
-
|
|
2317
|
-
case KG.DYNAMIC_QUERY_OPERATOR__LTE: {
|
|
2318
|
-
// 空白字符
|
|
2319
|
-
if (value.trim() === '') {
|
|
2320
|
-
paramRecord$QueryWhereSql[key] = undefined;
|
|
2321
|
-
break switch01;
|
|
2322
|
-
}
|
|
2323
|
-
|
|
2324
|
-
_stringValue = (() => {
|
|
2325
|
-
switch (kg.option.dbType!) {
|
|
2326
|
-
case KG.DB_TYPE.DM:
|
|
2327
|
-
case KG.DB_TYPE.MYSQL:
|
|
2328
|
-
case KG.DB_TYPE.ORACLE:
|
|
2329
|
-
case KG.DB_TYPE.POSTGRESQL:
|
|
2330
|
-
case KG.DB_TYPE.SQLITE:
|
|
2331
|
-
return `("${key01}" <= '${_stringValue}')`;
|
|
2332
|
-
|
|
2333
|
-
case KG.DB_TYPE.SQLSERVER:
|
|
2334
|
-
default:
|
|
2335
|
-
return `("${key01}" <= N'${_stringValue}')`;
|
|
2336
|
-
}
|
|
2337
|
-
})();
|
|
2338
|
-
break;
|
|
2339
|
-
}
|
|
2340
|
-
|
|
2341
|
-
case KG.DYNAMIC_QUERY_OPERATOR__GT: {
|
|
2342
|
-
// 空白字符
|
|
2343
|
-
if (value.trim() === '') {
|
|
2344
|
-
paramRecord$QueryWhereSql[key] = undefined;
|
|
2345
|
-
break switch01;
|
|
2346
|
-
}
|
|
2347
|
-
|
|
2348
|
-
_stringValue = (() => {
|
|
2349
|
-
switch (kg.option.dbType!) {
|
|
2350
|
-
case KG.DB_TYPE.DM:
|
|
2351
|
-
case KG.DB_TYPE.MYSQL:
|
|
2352
|
-
case KG.DB_TYPE.ORACLE:
|
|
2353
|
-
case KG.DB_TYPE.POSTGRESQL:
|
|
2354
|
-
case KG.DB_TYPE.SQLITE:
|
|
2355
|
-
return `("${key01}" > '${_stringValue}')`;
|
|
2356
|
-
|
|
2357
|
-
case KG.DB_TYPE.SQLSERVER:
|
|
2358
|
-
default:
|
|
2359
|
-
return `("${key01}" > N'${_stringValue}')`;
|
|
2360
|
-
}
|
|
2361
|
-
})();
|
|
2362
|
-
break;
|
|
2363
|
-
}
|
|
2364
|
-
|
|
2365
|
-
case KG.DYNAMIC_QUERY_OPERATOR__GTE: {
|
|
2366
|
-
// 空白字符
|
|
2367
|
-
if (value.trim() === '') {
|
|
2368
|
-
paramRecord$QueryWhereSql[key] = undefined;
|
|
2369
|
-
break switch01;
|
|
2370
|
-
}
|
|
2371
|
-
|
|
2372
|
-
_stringValue = (() => {
|
|
2373
|
-
switch (kg.option.dbType!) {
|
|
2374
|
-
case KG.DB_TYPE.DM:
|
|
2375
|
-
case KG.DB_TYPE.MYSQL:
|
|
2376
|
-
case KG.DB_TYPE.ORACLE:
|
|
2377
|
-
case KG.DB_TYPE.POSTGRESQL:
|
|
2378
|
-
case KG.DB_TYPE.SQLITE:
|
|
2379
|
-
return `("${key01}" >= '${_stringValue}')`;
|
|
2380
|
-
|
|
2381
|
-
case KG.DB_TYPE.SQLSERVER:
|
|
2382
|
-
default:
|
|
2383
|
-
return `("${key01}" >= N'${_stringValue}')`;
|
|
2384
|
-
}
|
|
2385
|
-
})();
|
|
2386
|
-
break;
|
|
2387
|
-
}
|
|
2388
|
-
|
|
2389
|
-
case KG.DYNAMIC_QUERY_OPERATOR__START_WITH: {
|
|
2390
|
-
// 空白字符
|
|
2391
|
-
if (value.trim() === '') {
|
|
2392
|
-
paramRecord$QueryWhereSql[key] = undefined;
|
|
2393
|
-
break switch01;
|
|
2394
|
-
}
|
|
2395
|
-
|
|
2396
|
-
_stringValue = (() => {
|
|
2397
|
-
switch (kg.option.dbType!) {
|
|
2398
|
-
case KG.DB_TYPE.DM:
|
|
2399
|
-
case KG.DB_TYPE.MYSQL:
|
|
2400
|
-
case KG.DB_TYPE.ORACLE:
|
|
2401
|
-
case KG.DB_TYPE.POSTGRESQL:
|
|
2402
|
-
case KG.DB_TYPE.SQLITE:
|
|
2403
|
-
return `("${key01}" LIKE '${_stringValue}%')`;
|
|
2404
|
-
|
|
2405
|
-
case KG.DB_TYPE.SQLSERVER:
|
|
2406
|
-
default:
|
|
2407
|
-
return `("${key01}" LIKE N'${_stringValue}%')`;
|
|
2408
|
-
}
|
|
2409
|
-
})();
|
|
2410
|
-
break;
|
|
2411
|
-
}
|
|
2412
|
-
|
|
2413
|
-
case KG.DYNAMIC_QUERY_OPERATOR__END_WITH: {
|
|
2414
|
-
// 空白字符
|
|
2415
|
-
if (value.trim() === '') {
|
|
2416
|
-
paramRecord$QueryWhereSql[key] = undefined;
|
|
2417
|
-
break switch01;
|
|
2418
|
-
}
|
|
2419
|
-
|
|
2420
|
-
_stringValue = (() => {
|
|
2421
|
-
switch (kg.option.dbType!) {
|
|
2422
|
-
case KG.DB_TYPE.DM:
|
|
2423
|
-
case KG.DB_TYPE.MYSQL:
|
|
2424
|
-
case KG.DB_TYPE.ORACLE:
|
|
2425
|
-
case KG.DB_TYPE.POSTGRESQL:
|
|
2426
|
-
case KG.DB_TYPE.SQLITE:
|
|
2427
|
-
return `("${key01}" LIKE '%${_stringValue}')`;
|
|
2428
|
-
|
|
2429
|
-
case KG.DB_TYPE.SQLSERVER:
|
|
2430
|
-
default:
|
|
2431
|
-
return `("${key01}" LIKE N'%${_stringValue}')`;
|
|
2432
|
-
}
|
|
2433
|
-
})();
|
|
2434
|
-
break;
|
|
2435
|
-
}
|
|
2436
|
-
|
|
2437
|
-
case KG.DYNAMIC_QUERY_OPERATOR__CONTAIN: {
|
|
2438
|
-
// 空白字符
|
|
2439
|
-
if (value.trim() === '') {
|
|
2440
|
-
paramRecord$QueryWhereSql[key] = undefined;
|
|
2441
|
-
break switch01;
|
|
2442
|
-
}
|
|
2443
|
-
|
|
2444
|
-
_stringValue = (() => {
|
|
2445
|
-
switch (kg.option.dbType!) {
|
|
2446
|
-
case KG.DB_TYPE.DM:
|
|
2447
|
-
case KG.DB_TYPE.MYSQL:
|
|
2448
|
-
case KG.DB_TYPE.ORACLE:
|
|
2449
|
-
case KG.DB_TYPE.POSTGRESQL:
|
|
2450
|
-
case KG.DB_TYPE.SQLITE:
|
|
2451
|
-
return `("${key01}" LIKE '%${_stringValue}%')`;
|
|
2452
|
-
|
|
2453
|
-
case KG.DB_TYPE.SQLSERVER:
|
|
2454
|
-
default:
|
|
2455
|
-
return `("${key01}" LIKE N'%${_stringValue}%')`;
|
|
2456
|
-
}
|
|
2457
|
-
})();
|
|
2458
|
-
break;
|
|
2459
|
-
}
|
|
2460
|
-
|
|
2461
|
-
case KG.DYNAMIC_QUERY_OPERATOR__EMPTY: {
|
|
2462
|
-
_stringValue = `("${key01}" IS NULL OR (TRIM(CONVERT(VARCHAR(MAX), "${key01}")) = ''))`;
|
|
2463
|
-
break;
|
|
2464
|
-
}
|
|
2465
|
-
|
|
2466
|
-
case KG.DYNAMIC_QUERY_OPERATOR__NOT_EMPTY: {
|
|
2467
|
-
_stringValue = `(NOT ("${key01}" IS NULL OR (TRIM(CONVERT(VARCHAR(MAX), "${key01}")) = '')))`;
|
|
2468
|
-
break;
|
|
2469
|
-
}
|
|
2470
|
-
|
|
2471
|
-
case KG.DYNAMIC_QUERY_OPERATOR__EQ:
|
|
2472
|
-
default: {
|
|
2473
|
-
// 空白字符
|
|
2474
|
-
if (value.trim() === '') {
|
|
2475
|
-
paramRecord$QueryWhereSql[key] = undefined;
|
|
2476
|
-
break switch01;
|
|
2477
|
-
}
|
|
2478
|
-
|
|
2479
|
-
_stringValue = (() => {
|
|
2480
|
-
switch (kg.option.dbType!) {
|
|
2481
|
-
case KG.DB_TYPE.DM:
|
|
2482
|
-
case KG.DB_TYPE.MYSQL:
|
|
2483
|
-
case KG.DB_TYPE.ORACLE:
|
|
2484
|
-
case KG.DB_TYPE.POSTGRESQL:
|
|
2485
|
-
case KG.DB_TYPE.SQLITE:
|
|
2486
|
-
return `("${key01}" = '${_stringValue}')`;
|
|
2487
|
-
|
|
2488
|
-
case KG.DB_TYPE.SQLSERVER:
|
|
2489
|
-
default:
|
|
2490
|
-
return `("${key01}" = N'${_stringValue}')`;
|
|
2491
|
-
}
|
|
2492
|
-
})();
|
|
2493
|
-
break;
|
|
2494
|
-
}
|
|
2495
|
-
}
|
|
2496
|
-
|
|
2497
|
-
paramRecord$QueryWhereSql[key] = _stringValue;
|
|
2498
|
-
|
|
2499
|
-
break;
|
|
2500
|
-
}
|
|
2501
|
-
//----------------------------------------------------------------------------------------------------
|
|
2502
|
-
//endregion
|
|
2503
|
-
|
|
2504
|
-
//region number
|
|
2505
|
-
//----------------------------------------------------------------------------------------------------
|
|
2506
|
-
case typeof value === 'number': {
|
|
2507
|
-
let _stringValue = '';
|
|
2508
|
-
|
|
2509
|
-
switch (operator) {
|
|
2510
|
-
case KG.DYNAMIC_QUERY_OPERATOR__NE: {
|
|
2511
|
-
_stringValue = `("${key01}" <> ${value})`;
|
|
2512
|
-
break;
|
|
2513
|
-
}
|
|
2514
|
-
|
|
2515
|
-
case KG.DYNAMIC_QUERY_OPERATOR__LT: {
|
|
2516
|
-
_stringValue = `("${key01}" < ${value})`;
|
|
2517
|
-
break;
|
|
2518
|
-
}
|
|
2519
|
-
|
|
2520
|
-
case KG.DYNAMIC_QUERY_OPERATOR__LTE: {
|
|
2521
|
-
_stringValue = `("${key01}" <= ${value})`;
|
|
2522
|
-
break;
|
|
2523
|
-
}
|
|
2524
|
-
|
|
2525
|
-
case KG.DYNAMIC_QUERY_OPERATOR__GT: {
|
|
2526
|
-
_stringValue = `("${key01}" > ${value})`;
|
|
2527
|
-
break;
|
|
2528
|
-
}
|
|
2529
|
-
|
|
2530
|
-
case KG.DYNAMIC_QUERY_OPERATOR__GTE: {
|
|
2531
|
-
_stringValue = `("${key01}" >= ${value})`;
|
|
2532
|
-
break;
|
|
2533
|
-
}
|
|
2534
|
-
|
|
2535
|
-
case KG.DYNAMIC_QUERY_OPERATOR__EMPTY: {
|
|
2536
|
-
_stringValue = `("${key01}" IS NULL OR (TRIM(CONVERT(VARCHAR(MAX), "${key01}")) = ''))`;
|
|
2537
|
-
break;
|
|
2538
|
-
}
|
|
2539
|
-
|
|
2540
|
-
case KG.DYNAMIC_QUERY_OPERATOR__NOT_EMPTY: {
|
|
2541
|
-
_stringValue = `(NOT ("${key01}" IS NULL OR (TRIM(CONVERT(VARCHAR(MAX), "${key01}")) = '')))`;
|
|
2542
|
-
break;
|
|
2543
|
-
}
|
|
2544
|
-
|
|
2545
|
-
case KG.DYNAMIC_QUERY_OPERATOR__EQ:
|
|
2546
|
-
default: {
|
|
2547
|
-
_stringValue = `("${key01}" = ${value})`;
|
|
2548
|
-
break;
|
|
2549
|
-
}
|
|
2550
|
-
}
|
|
2551
|
-
|
|
2552
|
-
paramRecord$QueryWhereSql[key] = _stringValue;
|
|
2553
|
-
|
|
2554
|
-
break;
|
|
2555
|
-
}
|
|
2556
|
-
//----------------------------------------------------------------------------------------------------
|
|
2557
|
-
//endregion
|
|
2558
|
-
|
|
2559
|
-
//region boolean
|
|
2560
|
-
//----------------------------------------------------------------------------------------------------
|
|
2561
|
-
case typeof value === 'boolean': {
|
|
2562
|
-
let _stringValue = '';
|
|
2563
|
-
|
|
2564
|
-
switch (operator) {
|
|
2565
|
-
case KG.DYNAMIC_QUERY_OPERATOR__NE: {
|
|
2566
|
-
_stringValue = (() => {
|
|
2567
|
-
switch (kg.option.dbType!) {
|
|
2568
|
-
case KG.DB_TYPE.DM:
|
|
2569
|
-
case KG.DB_TYPE.MYSQL:
|
|
2570
|
-
case KG.DB_TYPE.ORACLE:
|
|
2571
|
-
case KG.DB_TYPE.POSTGRESQL:
|
|
2572
|
-
case KG.DB_TYPE.SQLITE:
|
|
2573
|
-
return `("${key01}" <> ${value ? 'TRUE' : 'FALSE'})`;
|
|
2574
|
-
|
|
2575
|
-
case KG.DB_TYPE.SQLSERVER:
|
|
2576
|
-
default:
|
|
2577
|
-
return `("${key01}" <> ${value ? 1 : 0})`;
|
|
2578
|
-
}
|
|
2579
|
-
})();
|
|
2580
|
-
break;
|
|
2581
|
-
}
|
|
2582
|
-
|
|
2583
|
-
case KG.DYNAMIC_QUERY_OPERATOR__EMPTY: {
|
|
2584
|
-
_stringValue = `("${key01}" IS NULL OR (TRIM(CONVERT(VARCHAR(MAX), "${key01}")) = ''))`;
|
|
2585
|
-
break;
|
|
2586
|
-
}
|
|
2587
|
-
|
|
2588
|
-
case KG.DYNAMIC_QUERY_OPERATOR__NOT_EMPTY: {
|
|
2589
|
-
_stringValue = `(NOT ("${key01}" IS NULL OR (TRIM(CONVERT(VARCHAR(MAX), "${key01}")) = '')))`;
|
|
2590
|
-
break;
|
|
2591
|
-
}
|
|
2592
|
-
|
|
2593
|
-
case KG.DYNAMIC_QUERY_OPERATOR__EQ:
|
|
2594
|
-
default: {
|
|
2595
|
-
_stringValue = (() => {
|
|
2596
|
-
switch (kg.option.dbType!) {
|
|
2597
|
-
case KG.DB_TYPE.DM:
|
|
2598
|
-
case KG.DB_TYPE.MYSQL:
|
|
2599
|
-
case KG.DB_TYPE.ORACLE:
|
|
2600
|
-
case KG.DB_TYPE.POSTGRESQL:
|
|
2601
|
-
case KG.DB_TYPE.SQLITE:
|
|
2602
|
-
return `("${key01}" = ${value ? 'TRUE' : 'FALSE'})`;
|
|
2603
|
-
|
|
2604
|
-
case KG.DB_TYPE.SQLSERVER:
|
|
2605
|
-
default:
|
|
2606
|
-
return `("${key01}" = ${value ? 1 : 0})`;
|
|
2607
|
-
}
|
|
2608
|
-
})();
|
|
2609
|
-
break;
|
|
2610
|
-
}
|
|
2611
|
-
}
|
|
2612
|
-
|
|
2613
|
-
paramRecord$QueryWhereSql[key] = _stringValue;
|
|
2614
|
-
|
|
2615
|
-
break;
|
|
2616
|
-
}
|
|
2617
|
-
//----------------------------------------------------------------------------------------------------
|
|
2618
|
-
//endregion
|
|
2619
|
-
|
|
2620
|
-
//region null, undefined
|
|
2621
|
-
//----------------------------------------------------------------------------------------------------
|
|
2622
|
-
default: {
|
|
2623
|
-
let _stringValue = '';
|
|
2624
|
-
|
|
2625
|
-
switch (operator) {
|
|
2626
|
-
case KG.DYNAMIC_QUERY_OPERATOR__EMPTY: {
|
|
2627
|
-
_stringValue = `("${key01}" IS NULL OR (TRIM(CONVERT(VARCHAR(MAX), "${key01}")) = ''))`;
|
|
2628
|
-
break;
|
|
2629
|
-
}
|
|
2630
|
-
|
|
2631
|
-
case KG.DYNAMIC_QUERY_OPERATOR__NOT_EMPTY: {
|
|
2632
|
-
_stringValue = `(NOT ("${key01}" IS NULL OR (TRIM(CONVERT(VARCHAR(MAX), "${key01}")) = '')))`;
|
|
2633
|
-
break;
|
|
2634
|
-
}
|
|
2635
|
-
|
|
2636
|
-
default: {
|
|
2637
|
-
_stringValue = value;
|
|
2638
|
-
break;
|
|
2639
|
-
}
|
|
2640
|
-
}
|
|
2641
|
-
|
|
2642
|
-
paramRecord$QueryWhereSql[key] = _stringValue;
|
|
2643
|
-
|
|
2644
|
-
break;
|
|
2645
|
-
}
|
|
2646
|
-
//----------------------------------------------------------------------------------------------------
|
|
2647
|
-
//endregion
|
|
2648
|
-
}
|
|
2649
|
-
}
|
|
2650
|
-
|
|
2651
|
-
const whereSqlSegment: string = reduce(
|
|
2652
|
-
paramRecord$QueryWhereSql,
|
|
2653
|
-
(sql, value, key) => {
|
|
2654
|
-
const varProfileDetail = kgSearchFormID ? kgSearchKgVar?.store?.getVarProfileDetail(kgSearchFormID, key) : null;
|
|
2655
|
-
const varProfileDetail$Props = KgCoreUtil.tryParseJSON<IKgVarProfileDetailProperties>(varProfileDetail?.props);
|
|
2656
|
-
|
|
2657
|
-
// 要排除的属性, 不放进到 WHERE SQL 中
|
|
2658
|
-
if (varProfileDetail?.exclude_from_where_sql_flag === 1) {
|
|
2659
|
-
return sql;
|
|
2660
|
-
}
|
|
2661
|
-
|
|
2662
|
-
// 不属于当前 WHERE 查询语句,
|
|
2663
|
-
if (varProfileDetail$Props.whereSqlName && varProfileDetail$Props.whereSqlName !== 'WHERE') {
|
|
2664
|
-
return sql;
|
|
2665
|
-
}
|
|
2666
|
-
|
|
2667
|
-
// 如果一个属性, 不在查询字段中, 但是在表格配置的查询参数中, 则该属性不放进到 WHERE SQL 中,
|
|
2668
|
-
// 这种属性通常是直接传给后端接口用作逻辑处理, 不是简单的查询条件,
|
|
2669
|
-
if (!varProfileDetail && Object.keys(KgUtil.parseRequestParamsToJSON(kgVar?.varGridConfig?.value?.cmd_prm ?? '')).includes(key)) {
|
|
2670
|
-
return sql;
|
|
2671
|
-
}
|
|
2672
|
-
|
|
2673
|
-
if (!value) {
|
|
2674
|
-
return sql;
|
|
2675
|
-
}
|
|
2676
|
-
|
|
2677
|
-
return `${sql} AND ${value}`;
|
|
2678
|
-
},
|
|
2679
|
-
'',
|
|
2680
|
-
);
|
|
2681
|
-
|
|
2682
|
-
const whereSqlSegment01: string = reduce(
|
|
2683
|
-
paramRecord$QueryWhereSql,
|
|
2684
|
-
(sql, value, key) => {
|
|
2685
|
-
const varProfileDetail = kgSearchFormID ? kgSearchKgVar?.store?.getVarProfileDetail(kgSearchFormID, key) : null;
|
|
2686
|
-
const varProfileDetail$Props = KgCoreUtil.tryParseJSON<IKgVarProfileDetailProperties>(varProfileDetail?.props);
|
|
2687
|
-
|
|
2688
|
-
// 要排除的属性, 不放进到 WHERE SQL 中
|
|
2689
|
-
if (varProfileDetail?.exclude_from_where_sql_flag === 1) {
|
|
2690
|
-
return sql;
|
|
2691
|
-
}
|
|
2692
|
-
|
|
2693
|
-
// 不属于当前 WHERE 查询语句,
|
|
2694
|
-
if (varProfileDetail$Props.whereSqlName !== 'WHERE01') {
|
|
2695
|
-
return sql;
|
|
2696
|
-
}
|
|
2697
|
-
|
|
2698
|
-
// 如果一个属性, 不在查询字段中, 但是在表格配置的查询参数中, 则该属性不放进到 WHERE SQL 中,
|
|
2699
|
-
// 这种属性通常是直接传给后端接口用作逻辑处理, 不是简单的查询条件,
|
|
2700
|
-
if (!varProfileDetail && Object.keys(KgUtil.parseRequestParamsToJSON(kgVar?.varGridConfig?.value?.cmd_prm ?? '')).includes(key)) {
|
|
2701
|
-
return sql;
|
|
2702
|
-
}
|
|
2703
|
-
|
|
2704
|
-
if (!value) {
|
|
2705
|
-
return sql;
|
|
2706
|
-
}
|
|
2707
|
-
|
|
2708
|
-
return `${sql} AND ${value}`;
|
|
2709
|
-
},
|
|
2710
|
-
'',
|
|
2711
|
-
);
|
|
2712
|
-
|
|
2713
|
-
const whereSqlSegment02: string = reduce(
|
|
2714
|
-
paramRecord$QueryWhereSql,
|
|
2715
|
-
(sql, value, key) => {
|
|
2716
|
-
const varProfileDetail = kgSearchFormID ? kgSearchKgVar?.store?.getVarProfileDetail(kgSearchFormID, key) : null;
|
|
2717
|
-
const varProfileDetail$Props = KgCoreUtil.tryParseJSON<IKgVarProfileDetailProperties>(varProfileDetail?.props);
|
|
2718
|
-
|
|
2719
|
-
// 要排除的属性, 不放进到 WHERE SQL 中
|
|
2720
|
-
if (varProfileDetail?.exclude_from_where_sql_flag === 1) {
|
|
2721
|
-
return sql;
|
|
2722
|
-
}
|
|
2723
|
-
|
|
2724
|
-
// 不属于当前 WHERE 查询语句,
|
|
2725
|
-
if (varProfileDetail$Props.whereSqlName !== 'WHERE02') {
|
|
2726
|
-
return sql;
|
|
2727
|
-
}
|
|
2728
|
-
|
|
2729
|
-
// 如果一个属性, 不在查询字段中, 但是在表格配置的查询参数中, 则该属性不放进到 WHERE SQL 中,
|
|
2730
|
-
// 这种属性通常是直接传给后端接口用作逻辑处理, 不是简单的查询条件,
|
|
2731
|
-
if (!varProfileDetail && Object.keys(KgUtil.parseRequestParamsToJSON(kgVar?.varGridConfig?.value?.cmd_prm ?? '')).includes(key)) {
|
|
2732
|
-
return sql;
|
|
2733
|
-
}
|
|
2734
|
-
|
|
2735
|
-
if (!value) {
|
|
2736
|
-
return sql;
|
|
2737
|
-
}
|
|
2738
|
-
|
|
2739
|
-
return `${sql} AND ${value}`;
|
|
2740
|
-
},
|
|
2741
|
-
'',
|
|
2742
|
-
);
|
|
2743
|
-
|
|
2744
|
-
const whereSqlSegment03: string = reduce(
|
|
2745
|
-
paramRecord$QueryWhereSql,
|
|
2746
|
-
(sql, value, key) => {
|
|
2747
|
-
const varProfileDetail = kgSearchFormID ? kgSearchKgVar?.store?.getVarProfileDetail(kgSearchFormID, key) : null;
|
|
2748
|
-
const varProfileDetail$Props = KgCoreUtil.tryParseJSON<IKgVarProfileDetailProperties>(varProfileDetail?.props);
|
|
2749
|
-
|
|
2750
|
-
// 要排除的属性, 不放进到 WHERE SQL 中
|
|
2751
|
-
if (varProfileDetail?.exclude_from_where_sql_flag === 1) {
|
|
2752
|
-
return sql;
|
|
2753
|
-
}
|
|
2754
|
-
|
|
2755
|
-
// 不属于当前 WHERE 查询语句,
|
|
2756
|
-
if (varProfileDetail$Props.whereSqlName !== 'WHERE03') {
|
|
2757
|
-
return sql;
|
|
2758
|
-
}
|
|
2759
|
-
|
|
2760
|
-
// 如果一个属性, 不在查询字段中, 但是在表格配置的查询参数中, 则该属性不放进到 WHERE SQL 中,
|
|
2761
|
-
// 这种属性通常是直接传给后端接口用作逻辑处理, 不是简单的查询条件,
|
|
2762
|
-
if (!varProfileDetail && Object.keys(KgUtil.parseRequestParamsToJSON(kgVar?.varGridConfig?.value?.cmd_prm ?? '')).includes(key)) {
|
|
2763
|
-
return sql;
|
|
2764
|
-
}
|
|
2765
|
-
|
|
2766
|
-
if (!value) {
|
|
2767
|
-
return sql;
|
|
2768
|
-
}
|
|
2769
|
-
|
|
2770
|
-
return `${sql} AND ${value}`;
|
|
2771
|
-
},
|
|
2772
|
-
'',
|
|
2773
|
-
);
|
|
2774
|
-
|
|
2775
|
-
const whereSqlSegment04: string = reduce(
|
|
2776
|
-
paramRecord$QueryWhereSql,
|
|
2777
|
-
(sql, value, key) => {
|
|
2778
|
-
const varProfileDetail = kgSearchFormID ? kgSearchKgVar?.store?.getVarProfileDetail(kgSearchFormID, key) : null;
|
|
2779
|
-
const varProfileDetail$Props = KgCoreUtil.tryParseJSON<IKgVarProfileDetailProperties>(varProfileDetail?.props);
|
|
2780
|
-
|
|
2781
|
-
// 要排除的属性, 不放进到 WHERE SQL 中
|
|
2782
|
-
if (varProfileDetail?.exclude_from_where_sql_flag === 1) {
|
|
2783
|
-
return sql;
|
|
2784
|
-
}
|
|
2785
|
-
|
|
2786
|
-
// 不属于当前 WHERE 查询语句,
|
|
2787
|
-
if (varProfileDetail$Props.whereSqlName !== 'WHERE04') {
|
|
2788
|
-
return sql;
|
|
2789
|
-
}
|
|
2790
|
-
|
|
2791
|
-
// 如果一个属性, 不在查询字段中, 但是在表格配置的查询参数中, 则该属性不放进到 WHERE SQL 中,
|
|
2792
|
-
// 这种属性通常是直接传给后端接口用作逻辑处理, 不是简单的查询条件,
|
|
2793
|
-
if (!varProfileDetail && Object.keys(KgUtil.parseRequestParamsToJSON(kgVar?.varGridConfig?.value?.cmd_prm ?? '')).includes(key)) {
|
|
2794
|
-
return sql;
|
|
2795
|
-
}
|
|
2796
|
-
|
|
2797
|
-
if (!value) {
|
|
2798
|
-
return sql;
|
|
2799
|
-
}
|
|
2800
|
-
|
|
2801
|
-
return `${sql} AND ${value}`;
|
|
2802
|
-
},
|
|
2803
|
-
'',
|
|
2804
|
-
);
|
|
2805
|
-
|
|
2806
|
-
const whereSqlSegment05: string = reduce(
|
|
2807
|
-
paramRecord$QueryWhereSql,
|
|
2808
|
-
(sql, value, key) => {
|
|
2809
|
-
const varProfileDetail = kgSearchFormID ? kgSearchKgVar?.store?.getVarProfileDetail(kgSearchFormID, key) : null;
|
|
2810
|
-
const varProfileDetail$Props = KgCoreUtil.tryParseJSON<IKgVarProfileDetailProperties>(varProfileDetail?.props);
|
|
2811
|
-
|
|
2812
|
-
// 要排除的属性, 不放进到 WHERE SQL 中
|
|
2813
|
-
if (varProfileDetail?.exclude_from_where_sql_flag === 1) {
|
|
2814
|
-
return sql;
|
|
2815
|
-
}
|
|
2816
|
-
|
|
2817
|
-
// 不属于当前 WHERE 查询语句,
|
|
2818
|
-
if (varProfileDetail$Props.whereSqlName !== 'WHERE05') {
|
|
2819
|
-
return sql;
|
|
2820
|
-
}
|
|
2821
|
-
|
|
2822
|
-
// 如果一个属性, 不在查询字段中, 但是在表格配置的查询参数中, 则该属性不放进到 WHERE SQL 中,
|
|
2823
|
-
// 这种属性通常是直接传给后端接口用作逻辑处理, 不是简单的查询条件,
|
|
2824
|
-
if (!varProfileDetail && Object.keys(KgUtil.parseRequestParamsToJSON(kgVar?.varGridConfig?.value?.cmd_prm ?? '')).includes(key)) {
|
|
2825
|
-
return sql;
|
|
2826
|
-
}
|
|
2827
|
-
|
|
2828
|
-
if (!value) {
|
|
2829
|
-
return sql;
|
|
2830
|
-
}
|
|
2831
|
-
|
|
2832
|
-
return `${sql} AND ${value}`;
|
|
2833
|
-
},
|
|
2834
|
-
'',
|
|
2835
|
-
);
|
|
2836
|
-
|
|
2837
|
-
//region WHERE
|
|
2838
|
-
//----------------------------------------------------------------------------------------------------
|
|
2839
|
-
let whereSql: string = `WHERE (1 = 1)${whereSqlSegment}`.replaceAll('(1 = 1) AND ', '');
|
|
2840
|
-
let whereSql01: string = `WHERE (1 = 1)${whereSqlSegment01}`.replaceAll('(1 = 1) AND ', '');
|
|
2841
|
-
let whereSql02: string = `WHERE (1 = 1)${whereSqlSegment02}`.replaceAll('(1 = 1) AND ', '');
|
|
2842
|
-
let whereSql03: string = `WHERE (1 = 1)${whereSqlSegment03}`.replaceAll('(1 = 1) AND ', '');
|
|
2843
|
-
let whereSql04: string = `WHERE (1 = 1)${whereSqlSegment04}`.replaceAll('(1 = 1) AND ', '');
|
|
2844
|
-
let whereSql05: string = `WHERE (1 = 1)${whereSqlSegment05}`.replaceAll('(1 = 1) AND ', '');
|
|
2845
|
-
//----------------------------------------------------------------------------------------------------
|
|
2846
|
-
//endregion
|
|
2847
|
-
|
|
2848
|
-
//region ORDER BY
|
|
2849
|
-
//----------------------------------------------------------------------------------------------------
|
|
2850
|
-
let orderBySql = '';
|
|
2851
|
-
|
|
2852
|
-
{
|
|
2853
|
-
// 如果没有指定排序的列, 则默认根据下面这些字段进行排序, 如果这些字段都不存在, 则根据主键进行排序,
|
|
2854
|
-
if (!paramRecord.column) {
|
|
2855
|
-
switch (true) {
|
|
2856
|
-
case !!kgVar?.currentVarGridDetails.value?.find((i) => last((i.var_nam ?? '').split('.')) === 'insDt'):
|
|
2857
|
-
paramRecord.column = 'insDt';
|
|
2858
|
-
paramRecord.order = 'desc';
|
|
2859
|
-
break;
|
|
2860
|
-
|
|
2861
|
-
case !!kgVar?.currentVarGridDetails.value?.find((i) => last((i.var_nam ?? '').split('.')) === 'ins_dt'):
|
|
2862
|
-
paramRecord.column = 'ins_dt';
|
|
2863
|
-
paramRecord.order = 'desc';
|
|
2864
|
-
break;
|
|
2865
|
-
|
|
2866
|
-
case !!kgVar?.currentVarGridDetails.value?.find((i) => last((i.var_nam ?? '').split('.')) === 'insdt'):
|
|
2867
|
-
paramRecord.column = 'insdt';
|
|
2868
|
-
paramRecord.order = 'desc';
|
|
2869
|
-
break;
|
|
2870
|
-
|
|
2871
|
-
case !!kgVar?.currentVarGridDetails.value?.find((i) => last((i.var_nam ?? '').split('.')) === 'adddte'):
|
|
2872
|
-
paramRecord.column = 'adddte';
|
|
2873
|
-
paramRecord.order = 'desc';
|
|
2874
|
-
break;
|
|
2875
|
-
|
|
2876
|
-
case !!kgVar?.currentVarGridDetails.value?.find((i) => last((i.var_nam ?? '').split('.')) === 'moddte'):
|
|
2877
|
-
paramRecord.column = 'moddte';
|
|
2878
|
-
paramRecord.order = 'desc';
|
|
2879
|
-
break;
|
|
2880
|
-
|
|
2881
|
-
case !!kgVar?.currentVarGridDetails.value?.find((i) => last((i.var_nam ?? '').split('.')) === 'createTime'):
|
|
2882
|
-
paramRecord.column = 'createTime';
|
|
2883
|
-
paramRecord.order = 'desc';
|
|
2884
|
-
break;
|
|
2885
|
-
|
|
2886
|
-
case !!kgVar?.currentVarGridDetails.value?.find((i) => last((i.var_nam ?? '').split('.')) === 'create_time'):
|
|
2887
|
-
paramRecord.column = 'create_time';
|
|
2888
|
-
paramRecord.order = 'desc';
|
|
2889
|
-
break;
|
|
2890
|
-
|
|
2891
|
-
case !!kgVar?.currentVarGridDetails.value?.find((i) => last((i.var_nam ?? '').split('.')) === 'modifyTime'):
|
|
2892
|
-
paramRecord.column = 'modifyTime';
|
|
2893
|
-
paramRecord.order = 'desc';
|
|
2894
|
-
break;
|
|
2895
|
-
|
|
2896
|
-
case !!kgVar?.currentVarGridDetails.value?.find((i) => last((i.var_nam ?? '').split('.')) === 'modify_time'):
|
|
2897
|
-
paramRecord.column = 'modify_time';
|
|
2898
|
-
paramRecord.order = 'desc';
|
|
2899
|
-
break;
|
|
2900
|
-
|
|
2901
|
-
default:
|
|
2902
|
-
paramRecord.column = kgVar?.kgTable?.id?.value;
|
|
2903
|
-
break;
|
|
2904
|
-
}
|
|
2905
|
-
}
|
|
2906
|
-
|
|
2907
|
-
const _column = (() => {
|
|
2908
|
-
// 转换为下划线命名方式
|
|
2909
|
-
if (kgVar?.varGridConfig.value?.convert_sort_field_to_under_score_flg === 1) {
|
|
2910
|
-
return paramRecord.column
|
|
2911
|
-
.split('.')
|
|
2912
|
-
.map((i: string) => KgUtil.snakeCase(i))
|
|
2913
|
-
.join('.');
|
|
2914
|
-
}
|
|
2915
|
-
|
|
2916
|
-
return paramRecord.column;
|
|
2917
|
-
})();
|
|
2918
|
-
|
|
2919
|
-
if (_column) {
|
|
2920
|
-
orderBySql = `ORDER BY "${_column}"`;
|
|
2921
|
-
|
|
2922
|
-
switch (true) {
|
|
2923
|
-
case (paramRecord.order || '').trim().toUpperCase() === 'ASC': {
|
|
2924
|
-
orderBySql += ' ASC';
|
|
2925
|
-
break;
|
|
2926
|
-
}
|
|
2927
|
-
|
|
2928
|
-
case (paramRecord.order || '').trim().toUpperCase() === 'DESC': {
|
|
2929
|
-
orderBySql += ' DESC';
|
|
2930
|
-
break;
|
|
2931
|
-
}
|
|
2932
|
-
}
|
|
2933
|
-
|
|
2934
|
-
orderBySql = orderBySql.trim();
|
|
2935
|
-
}
|
|
2936
|
-
}
|
|
2937
|
-
//----------------------------------------------------------------------------------------------------
|
|
2938
|
-
//endregion
|
|
2939
|
-
|
|
2940
|
-
return {
|
|
2941
|
-
/**
|
|
2942
|
-
* 查询操作符对象的 JSON 字符串.
|
|
2943
|
-
*/
|
|
2944
|
-
operatorObjectJSON: encodeURIComponent(JSON.stringify(_dynamicQueryOperatorModel ?? {})),
|
|
2945
|
-
|
|
2946
|
-
/**
|
|
2947
|
-
* ORDER BY SQL.
|
|
2948
|
-
*/
|
|
2949
|
-
orderBySql: encodeURIComponent(orderBySql),
|
|
2950
|
-
|
|
2951
|
-
/**
|
|
2952
|
-
* <p>查询字段的 WHERE 片段对象的 JSON 字符串.</p>
|
|
2953
|
-
* <p>该对象中, 每一个 key 表示字段名, 每一个 value 表示该字段对应的 SQL 片段</p>
|
|
2954
|
-
*/
|
|
2955
|
-
whereObjectJSON: encodeURIComponent(JSON.stringify(paramRecord$QueryWhereSql ?? {})),
|
|
2956
|
-
|
|
2957
|
-
/**
|
|
2958
|
-
* WHERE SQL.
|
|
2959
|
-
*/
|
|
2960
|
-
whereSql: encodeURIComponent(whereSql),
|
|
2961
|
-
|
|
2962
|
-
/**
|
|
2963
|
-
* WHERE SQL.
|
|
2964
|
-
*/
|
|
2965
|
-
whereSql01: encodeURIComponent(whereSql01),
|
|
2966
|
-
|
|
2967
|
-
/**
|
|
2968
|
-
* WHERE SQL.
|
|
2969
|
-
*/
|
|
2970
|
-
whereSql02: encodeURIComponent(whereSql02),
|
|
2971
|
-
|
|
2972
|
-
/**
|
|
2973
|
-
* WHERE SQL.
|
|
2974
|
-
*/
|
|
2975
|
-
whereSql03: encodeURIComponent(whereSql03),
|
|
2976
|
-
|
|
2977
|
-
/**
|
|
2978
|
-
* WHERE SQL.
|
|
2979
|
-
*/
|
|
2980
|
-
whereSql04: encodeURIComponent(whereSql04),
|
|
2981
|
-
|
|
2982
|
-
/**
|
|
2983
|
-
* WHERE SQL.
|
|
2984
|
-
*/
|
|
2985
|
-
whereSql05: encodeURIComponent(whereSql05),
|
|
2986
|
-
};
|
|
2987
|
-
}
|
|
2988
|
-
//----------------------------------------------------------------------------------------------------
|
|
2989
|
-
//endregion
|
|
2990
|
-
}
|
|
2991
|
-
|
|
2992
|
-
export type ModalFunc = {
|
|
2993
|
-
destroy: () => void;
|
|
2994
|
-
update: (configUpdate: ModalFuncProps | ((prevConfig: ModalFuncProps) => ModalFuncProps)) => void;
|
|
2995
|
-
showLoading(): void;
|
|
2996
|
-
hideLoading(): void;
|
|
2997
|
-
};
|