@geelato/gl-runtime-core 0.0.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/dist/gl-runtime-core.css +1 -0
- package/dist/gl-runtime-core.css.gz +0 -0
- package/dist/gl-runtime-core.js +169768 -0
- package/dist/gl-runtime-core.js.gz +0 -0
- package/dist/gl-runtime-core.umd.cjs +35 -0
- package/dist/iconfont-BJ2VOOKJ.js +35 -0
- package/dist/iconfont-BJ2VOOKJ.js.gz +0 -0
- package/dist/types/actions/JsScriptExecutor.d.ts +291 -0
- package/dist/types/actions/fns/datetime.d.ts +22 -0
- package/dist/types/actions/fns/device.d.ts +23 -0
- package/dist/types/actions/fns/math.d.ts +27 -0
- package/dist/types/api/EntityApi.d.ts +143 -0
- package/dist/types/api/EntityDataSource.d.ts +272 -0
- package/dist/types/api/EntityDeleteService.d.ts +47 -0
- package/dist/types/api/EntityQueryCache.d.ts +62 -0
- package/dist/types/api/EntityQueryService.d.ts +71 -0
- package/dist/types/api/EntityResultMapping.d.ts +11 -0
- package/dist/types/api/EntitySaveService.d.ts +46 -0
- package/dist/types/api/EntityTypes.d.ts +135 -0
- package/dist/types/api/EntityUtilService.d.ts +42 -0
- package/dist/types/assets/globalConfig.d.ts +5 -0
- package/dist/types/components/AppProvideProxy.d.ts +21 -0
- package/dist/types/components/ComponentTreeParser.d.ts +17 -0
- package/dist/types/components/FormProvideProxy.d.ts +35 -0
- package/dist/types/components/Hooks.d.ts +7 -0
- package/dist/types/components/PageDataSourceManager.d.ts +28 -0
- package/dist/types/components/PageLoader.d.ts +6 -0
- package/dist/types/components/PageProvideProxy.d.ts +413 -0
- package/dist/types/components/UiEventNames.d.ts +15 -0
- package/dist/types/components/gl-chart/GlChart.vue.d.ts +135 -0
- package/dist/types/components/gl-component/GlComponent.vue.d.ts +191 -0
- package/dist/types/components/gl-component/GlComponentSupport.d.ts +49 -0
- package/dist/types/components/gl-component/GlInsts.vue.d.ts +19 -0
- package/dist/types/components/gl-div/GlDiv.vue.d.ts +107 -0
- package/dist/types/components/gl-dnd-placeholder/Index.vue.d.ts +112 -0
- package/dist/types/components/gl-html/Index.vue.d.ts +7 -0
- package/dist/types/components/gl-iconfont/IconsJson.d.ts +15 -0
- package/dist/types/components/gl-iconfont/Index.vue.d.ts +19 -0
- package/dist/types/components/gl-loader/GlLoader.vue.d.ts +3 -0
- package/dist/types/components/gl-login/FloatingActionButton.vue.d.ts +9 -0
- package/dist/types/components/gl-login/LoginDialog.vue.d.ts +9 -0
- package/dist/types/components/gl-loop/GlLoop.vue.d.ts +230 -0
- package/dist/types/components/gl-page-viewer/GlPageViewer.vue.d.ts +221 -0
- package/dist/types/components/gl-scanner/GlScanner.vue.d.ts +44 -0
- package/dist/types/components/gl-template/GlTemplate.vue.d.ts +154 -0
- package/dist/types/components/gl-template/Typs.d.ts +4 -0
- package/dist/types/components/gl-virtual/Index.vue.d.ts +3 -0
- package/dist/types/components/mixins.d.ts +86 -0
- package/dist/types/components/ui-mixins.d.ts +16 -0
- package/dist/types/composables/useApiUrl.d.ts +30 -0
- package/dist/types/composables/useGlobal.d.ts +21 -0
- package/dist/types/composables/useLoading.d.ts +6 -0
- package/dist/types/composables/useLogger.d.ts +32 -0
- package/dist/types/composables/useMessages.d.ts +15 -0
- package/dist/types/composables/useRole.d.ts +5 -0
- package/dist/types/locales/index.d.ts +21 -0
- package/dist/types/locales/lang/en-US.d.ts +4 -0
- package/dist/types/locales/lang/zh-CN.d.ts +4 -0
- package/dist/types/m/datasource/ApplicationApi.d.ts +163 -0
- package/dist/types/m/datasource/ArcoApi.d.ts +76 -0
- package/dist/types/m/datasource/Base.d.ts +99 -0
- package/dist/types/m/datasource/BranchApi.d.ts +2 -0
- package/dist/types/m/datasource/CompanyApi.d.ts +49 -0
- package/dist/types/m/datasource/DictApi.d.ts +127 -0
- package/dist/types/m/datasource/DictionaryApi.d.ts +16 -0
- package/dist/types/m/datasource/EncodingApi.d.ts +59 -0
- package/dist/types/m/datasource/Entry.d.ts +5 -0
- package/dist/types/m/datasource/FieldMeta.d.ts +6 -0
- package/dist/types/m/datasource/FileApi.d.ts +273 -0
- package/dist/types/m/datasource/FileTemplateApi.d.ts +114 -0
- package/dist/types/m/datasource/InterApi.d.ts +104 -0
- package/dist/types/m/datasource/MarketApi.d.ts +191 -0
- package/dist/types/m/datasource/MessageApi.d.ts +27 -0
- package/dist/types/m/datasource/ModelApi.d.ts +327 -0
- package/dist/types/m/datasource/NoticeApi.d.ts +37 -0
- package/dist/types/m/datasource/OcrPdfApi.d.ts +145 -0
- package/dist/types/m/datasource/PluginApi.d.ts +35 -0
- package/dist/types/m/datasource/ScheduleApi.d.ts +67 -0
- package/dist/types/m/datasource/SecurityApi.d.ts +253 -0
- package/dist/types/m/datasource/SiteApi.d.ts +38 -0
- package/dist/types/m/datasource/SqlApi.d.ts +45 -0
- package/dist/types/m/datasource/SysConfigApi.d.ts +52 -0
- package/dist/types/m/datasource/TenantApi.d.ts +107 -0
- package/dist/types/m/datasource/UserApi.d.ts +173 -0
- package/dist/types/m/datasource/VersionApi.d.ts +59 -0
- package/dist/types/m/datasource/WeChatApi.d.ts +34 -0
- package/dist/types/m/datasource/WorkflowApi.d.ts +317 -0
- package/dist/types/m/datasource/ZxingApi.d.ts +38 -0
- package/dist/types/main.d.ts +114 -0
- package/dist/types/store/index.d.ts +2 -0
- package/dist/types/store/modules/user/index.d.ts +16 -0
- package/dist/types/types/Operators.d.ts +19 -0
- package/dist/types/types/global.d.ts +198 -0
- package/dist/types/types/options.d.ts +35 -0
- package/dist/types/utils/Auth.d.ts +37 -0
- package/dist/types/utils/CacheManager.d.ts +110 -0
- package/dist/types/utils/CheckUtil.d.ts +5 -0
- package/dist/types/utils/ClipboardUtil.d.ts +24 -0
- package/dist/types/utils/ConvertUtil.d.ts +81 -0
- package/dist/types/utils/Event.d.ts +2 -0
- package/dist/types/utils/FileUtil.d.ts +7 -0
- package/dist/types/utils/GenerateUtil.d.ts +14 -0
- package/dist/types/utils/IsUtil.d.ts +126 -0
- package/dist/types/utils/MixUtil.d.ts +49 -0
- package/dist/types/utils/Monitor.d.ts +2 -0
- package/dist/types/utils/PageUtil.d.ts +14 -0
- package/dist/types/utils/PluginUtil.d.ts +9 -0
- package/dist/types/utils/RecordsUtil.d.ts +3 -0
- package/dist/types/utils/SseClient.d.ts +34 -0
- package/dist/types/utils/StoreUtil.d.ts +8 -0
- package/dist/types/utils/StringUtil.d.ts +29 -0
- package/dist/types/utils/Utils.d.ts +217 -0
- package/dist/types/utils/emitter.d.ts +3 -0
- package/dist/types/utils/renderTemplate.d.ts +6 -0
- package/dist/types/utils/toChineseCurrency.d.ts +5 -0
- package/package.json +76 -0
- package/src/main.ts +498 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { PageQueryResponse, QueryResult } from './Base';
|
|
2
|
+
import { AxiosResponse } from 'axios';
|
|
3
|
+
export interface QueryBarcodeForm {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
code: string;
|
|
7
|
+
type: string;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
borderTop: number;
|
|
11
|
+
borderRight: number;
|
|
12
|
+
borderBottom: number;
|
|
13
|
+
borderLeft: number;
|
|
14
|
+
lucency: boolean;
|
|
15
|
+
backgroundColor: string;
|
|
16
|
+
displayText: boolean;
|
|
17
|
+
fontFamily: string;
|
|
18
|
+
fontSize: number;
|
|
19
|
+
fontMargin: number;
|
|
20
|
+
fontAlign: string;
|
|
21
|
+
fontPosition: string;
|
|
22
|
+
fontStyle: string;
|
|
23
|
+
fontColor: string;
|
|
24
|
+
pictureFormat: string;
|
|
25
|
+
enableStatus: number;
|
|
26
|
+
description: string;
|
|
27
|
+
appId: string;
|
|
28
|
+
tenantCode: string;
|
|
29
|
+
}
|
|
30
|
+
export declare function pageQueryBarcodes(params: Record<string, any>): Promise< AxiosResponse<PageQueryResponse, any>>;
|
|
31
|
+
export declare function queryBarcodes(params: Record<string, any>): Promise< AxiosResponse<QueryBarcodeForm[], any>>;
|
|
32
|
+
export declare function getBarcode(id: string): Promise< AxiosResponse<QueryBarcodeForm, any>>;
|
|
33
|
+
export declare function createOrUpdateBarcode(params: QueryBarcodeForm): Promise< AxiosResponse<QueryResult, any>>;
|
|
34
|
+
export declare function deleteBarcode(id: string): Promise< AxiosResponse<QueryResult, any>>;
|
|
35
|
+
export declare function validateBarcodeCode(params: QueryBarcodeForm): Promise< AxiosResponse<boolean, any>>;
|
|
36
|
+
export declare function generateBarcodeById(type: string, id: string, text: string): Promise< AxiosResponse<QueryResult, any>>;
|
|
37
|
+
export declare function generateBarcodeByForm(type: string, text: string, params: QueryBarcodeForm): Promise< AxiosResponse<QueryResult, any>>;
|
|
38
|
+
export declare function getFontFamily(): Promise< AxiosResponse<string[], any>>;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { default as Big } from 'big.js';
|
|
3
|
+
import { default as emitter } from './utils/emitter.ts';
|
|
4
|
+
import { isLogin } from './utils/Auth';
|
|
5
|
+
import { default as PageProvideProxy, addInnerComponentPosition, PageParamsKey, PageProvideKey, paramStringify } from './components/PageProvideProxy';
|
|
6
|
+
import { default as GlIconfont } from './components/gl-iconfont/Index.vue';
|
|
7
|
+
import { default as GlPageViewer } from './components/gl-page-viewer/GlPageViewer.vue';
|
|
8
|
+
import { IconsJson } from './components/gl-iconfont/IconsJson';
|
|
9
|
+
import { EntityApi, entityApi } from './api/EntityApi.ts';
|
|
10
|
+
import { default as utils } from './utils/Utils';
|
|
11
|
+
import { default as mixins } from './components/mixins';
|
|
12
|
+
import { default as PluginUtil } from './utils/PluginUtil';
|
|
13
|
+
import { default as useGlobal } from './composables/useGlobal.ts';
|
|
14
|
+
import { default as useApiUrl } from './composables/useApiUrl.ts';
|
|
15
|
+
import { default as useMessages } from './composables/useMessages.ts';
|
|
16
|
+
import { default as jsScriptExecutor } from './actions/JsScriptExecutor.ts';
|
|
17
|
+
import { default as AppProvideProxy, AppProvideKey } from './components/AppProvideProxy';
|
|
18
|
+
import { default as FormProvideProxy, FormProvideKey, SubmitFormResult } from './components/FormProvideProxy';
|
|
19
|
+
import { Schema } from 'b-validate';
|
|
20
|
+
import { Geelato, GeelatoPlugin, GeelatoPluginOptions } from './types/global.ts';
|
|
21
|
+
import { executeArrayExpressions, executeObjectPropsExpressions, createValidator } from './components/gl-component/GlComponentSupport';
|
|
22
|
+
import { AppState, QueryAppForm, QueryMenuForm, QueryMultiLangForm } from './m/datasource/ApplicationApi';
|
|
23
|
+
import { FormParams, FormState, HttpResponse, ListParams, ModelParams, PageQueryFilter, PageQueryRequest, PageQueryResponse, Pagination, QueryResult, SelectOption } from './m/datasource/Base';
|
|
24
|
+
import { QueryCompanyForm } from './m/datasource/CompanyApi';
|
|
25
|
+
import { QueryDictForm, QueryDictItemForm } from './m/datasource/DictApi';
|
|
26
|
+
import { EncodingItem, QueryEncodingForm } from './m/datasource/EncodingApi';
|
|
27
|
+
import { AttachmentForm, Base64FileParams, UploadFileParams } from './m/datasource/FileApi';
|
|
28
|
+
import { BusinessMetaData, BusinessRuleData, BusinessTypeData, QueryFileTemplateForm } from './m/datasource/FileTemplateApi';
|
|
29
|
+
import { ApiDataType, ApiParamType, ResponseFormat, QueryApiForm, QueryApiParamForm } from './m/datasource/InterApi';
|
|
30
|
+
import { ChatRecord, MessageListType, MessageRecord } from './m/datasource/MessageApi';
|
|
31
|
+
import { NoticeListType, NoticeRecord } from './m/datasource/NoticeApi';
|
|
32
|
+
import { ColumnSelectType, DataTypeRadius, QueryAppTableForm, QueryAppViewForm, QueryConnectForm, QueryMultiComponentForm, QueryTableCheckForm, QueryTableColumnForm, QueryTableForeignForm, QueryTableForm, QueryViewForm } from './m/datasource/ModelApi';
|
|
33
|
+
import { OcrPdfContentForm, PDFAnnotationDiscernRuleForm, PDFAnnotationMetaForm, PDFAnnotationPickContentForm, QueryOcrPdfForm, QueryOcrPdfMetaForm } from './m/datasource/OcrPdfApi';
|
|
34
|
+
import { QueryScheduleForm, QueryScheduleLogForm } from './m/datasource/ScheduleApi';
|
|
35
|
+
import { QueryAppSqlForm, QuerySqlForm } from './m/datasource/SqlApi';
|
|
36
|
+
import { QueryColumnRolePermissionForm, QueryOrgForm, QueryOrgUserForm, QueryPermissionClassifyForm, QueryPermissionForm, QueryRoleAppForm, QueryRoleForm, QueryRolePermissionForm, QueryRoleTreeNodeForm, QueryRoleUserForm, QueryTableRolePermissionClassifyForm, QueryTableRolePermissionForm, QueryTreeNodeForm, QueryUserForm } from './m/datasource/SecurityApi';
|
|
37
|
+
import { QuerySysConfigForm } from './m/datasource/SysConfigApi';
|
|
38
|
+
import { TenantBaseForm, TenantIndexForm, TenantState } from './m/datasource/TenantApi';
|
|
39
|
+
import { AccountUserInfo, AuthCodeForm, BindAccountData, LoginData, LoginRes, ResetPasswordForm, UserState } from './m/datasource/UserApi';
|
|
40
|
+
import { QueryAppVersionForm } from './m/datasource/VersionApi';
|
|
41
|
+
import { QueryBarcodeForm } from './m/datasource/ZxingApi';
|
|
42
|
+
import { QueryFileInfoForm, QueryStaticSiteForm } from './m/datasource/SiteApi';
|
|
43
|
+
import { SelectOptionType } from './m/datasource/ArcoApi';
|
|
44
|
+
import { marketApi, applyApp } from './m/datasource/MarketApi';
|
|
45
|
+
import { useUserStore } from './store/index';
|
|
46
|
+
import { default as Operators } from './types/Operators.ts';
|
|
47
|
+
import { default as UiEventNames } from './components/UiEventNames';
|
|
48
|
+
import { default as GlTemplate } from './components/gl-template/GlTemplate.vue';
|
|
49
|
+
import { default as useLogger } from './composables/useLogger.ts';
|
|
50
|
+
import { default as useLoading } from './composables/useLoading.ts';
|
|
51
|
+
import { loadPageContent } from './components/PageLoader';
|
|
52
|
+
import { CacheManager, CacheStorageType, defaultCacheManager, memoryCacheManager } from './utils/CacheManager';
|
|
53
|
+
import * as authUtil from './utils/Auth';
|
|
54
|
+
import * as eventUtil from './utils/Event';
|
|
55
|
+
import * as applicationApi from './m/datasource/ApplicationApi';
|
|
56
|
+
import * as companyApi from './m/datasource/CompanyApi';
|
|
57
|
+
import * as dictApi from './m/datasource/DictApi';
|
|
58
|
+
import * as dictionaryApi from './m/datasource/DictionaryApi';
|
|
59
|
+
import * as encodingApi from './m/datasource/EncodingApi';
|
|
60
|
+
import * as fileApi from './m/datasource/FileApi';
|
|
61
|
+
import * as fileTemplateApi from './m/datasource/FileTemplateApi';
|
|
62
|
+
import * as interApi from './m/datasource/InterApi';
|
|
63
|
+
import * as messageApi from './m/datasource/MessageApi';
|
|
64
|
+
import * as noticeApi from './m/datasource/NoticeApi';
|
|
65
|
+
import * as modelApi from './m/datasource/ModelApi';
|
|
66
|
+
import * as ocrPdfApi from './m/datasource/OcrPdfApi';
|
|
67
|
+
import * as pluginApi from './m/datasource/PluginApi';
|
|
68
|
+
import * as scheduleApi from './m/datasource/ScheduleApi';
|
|
69
|
+
import * as sqlApi from './m/datasource/SqlApi';
|
|
70
|
+
import * as securityApi from './m/datasource/SecurityApi';
|
|
71
|
+
import * as sysConfigApi from './m/datasource/SysConfigApi';
|
|
72
|
+
import * as tenantApi from './m/datasource/TenantApi';
|
|
73
|
+
import * as userApi from './m/datasource/UserApi';
|
|
74
|
+
import * as versionApi from './m/datasource/VersionApi';
|
|
75
|
+
import * as weChatApi from './m/datasource/WeChatApi';
|
|
76
|
+
import * as zxingApi from './m/datasource/ZxingApi';
|
|
77
|
+
import * as siteApi from './m/datasource/SiteApi';
|
|
78
|
+
import * as arcoApi from './m/datasource/ArcoApi';
|
|
79
|
+
import * as branchApi from './m/datasource/BranchApi';
|
|
80
|
+
declare const iconsJson: any;
|
|
81
|
+
export { sseClient, initRuntimeSse, UPGRADE_DICTIONARY_TOPIC } from './utils/SseClient';
|
|
82
|
+
export * from './m/datasource/NoticeApi';
|
|
83
|
+
export * from './m/datasource/PluginApi';
|
|
84
|
+
export * from './m/datasource/WorkflowApi';
|
|
85
|
+
export { EntityQueryService } from './api/EntityQueryService';
|
|
86
|
+
export { executeInstPropsExpressions } from './components/gl-component/GlComponentSupport';
|
|
87
|
+
export { innerComponents } from './components/PageProvideProxy';
|
|
88
|
+
export { getBearerToken } from './utils/Auth';
|
|
89
|
+
export type { PdfAnnotationArea, ApiPagedResult, ApiResult, CellMeta, I18nMessages, BasePlugin, PageConfig, Param, ParamMeta } from './types/global.ts';
|
|
90
|
+
export { PageStatus, PageType, CellValueTypeOptions, ApiResultStatus, CellValueType } from './types/options.ts';
|
|
91
|
+
export * from './components/ComponentTreeParser';
|
|
92
|
+
export type { PageCustomType, PageParamConfigType, PagePermission, IPageTemplate } from './components/PageProvideProxy';
|
|
93
|
+
export { PageTemplate, StateWorkflowTransfer, WorkflowPageTemplate } from './components/PageProvideProxy';
|
|
94
|
+
export { compareMeta, EntityDataSource, fetchEvents, FieldMeta, EntityLiteMeta, EntityMeta, EntitySaverField, EntityReaderParam, EntityReaderParamGroup, TriggerMode, TriggerConstraint, EntityReaderOrderEnum, EntityReaderOrder, EntityReader, EntityRecordStatus, EntityDeleter, EntitySaver, GetEntitySaversResult, isStopLoadDataByValue, isStopLoadDataByParams, isEntityQueryAble } from './api/EntityDataSource.ts';
|
|
95
|
+
export * from './components/Hooks';
|
|
96
|
+
export { default as runtimeI18n, setI18nLanguage, loadLanguageAsync, i18nRender, mergeLocaleMessages, mergeMessages, useLocaleRef, tLabel, ensureI18nKeys } from './locales';
|
|
97
|
+
declare const RuleExpression: string;
|
|
98
|
+
declare const vuePlugin: {
|
|
99
|
+
install: (app: App, options?: GeelatoPluginOptions) => any;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* 选择组件,用于设计时,点击组件的内置组件时,触发选中组件事件
|
|
103
|
+
* @param event
|
|
104
|
+
* @param inst
|
|
105
|
+
* @param isRuntime
|
|
106
|
+
* @param item 可能是一个表格的列column,也可能是一个查询条件queryItem
|
|
107
|
+
* @param ctx 需要在脚本编排面板的ctx上下文展示的内容,便于设计时选择
|
|
108
|
+
*/
|
|
109
|
+
declare const selectComponent: (event: any, inst: any, isRuntime: boolean, item?: any, ctx?: {
|
|
110
|
+
record: any;
|
|
111
|
+
}) => void;
|
|
112
|
+
export { Geelato, GeelatoPlugin, GeelatoPluginOptions, RuleExpression, isLogin, selectComponent, Big, AppProvideKey, AppProvideProxy, PageParamsKey, PageProvideKey, PageProvideProxy, addInnerComponentPosition, loadPageContent, paramStringify, FormProvideKey, FormProvideProxy, Schema, GlIconfont, GlPageViewer, EntityApi, entityApi, utils, authUtil, eventUtil, mixins, emitter, iconsJson, IconsJson, PluginUtil, useGlobal, useApiUrl, useMessages, useLogger, useLoading, jsScriptExecutor, applicationApi, AppState, QueryAppForm, QueryMenuForm, QueryMultiLangForm, HttpResponse, PageQueryRequest, PageQueryResponse, Pagination, QueryResult, SelectOption, ListParams, FormState, PageQueryFilter, FormParams, ModelParams, companyApi, QueryCompanyForm, dictApi, dictionaryApi, QueryDictForm, QueryDictItemForm, encodingApi, EncodingItem, QueryEncodingForm, fileApi, AttachmentForm, Base64FileParams, UploadFileParams, fileTemplateApi, BusinessTypeData, BusinessRuleData, BusinessMetaData, QueryFileTemplateForm, interApi, QueryApiParamForm, QueryApiForm, ApiParamType, ApiDataType, ResponseFormat, messageApi, ChatRecord, MessageListType, MessageRecord, noticeApi, NoticeListType, NoticeRecord, modelApi, QueryOcrPdfForm, QueryOcrPdfMetaForm, PDFAnnotationMetaForm, OcrPdfContentForm, PDFAnnotationPickContentForm, PDFAnnotationDiscernRuleForm, ocrPdfApi, DataTypeRadius, ColumnSelectType, QueryAppTableForm, QueryAppViewForm, QueryConnectForm, QueryMultiComponentForm, QueryTableColumnForm, QueryTableForeignForm, QueryTableForm, QueryViewForm, QueryTableCheckForm, scheduleApi, QueryScheduleForm, QueryScheduleLogForm, sqlApi, QueryAppSqlForm, QuerySqlForm, securityApi, QueryOrgForm, QueryUserForm, QueryOrgUserForm, QueryPermissionForm, QueryPermissionClassifyForm, QueryTableRolePermissionClassifyForm, QueryTreeNodeForm, QueryRoleForm, QueryRoleAppForm, QueryRoleUserForm, QueryRoleTreeNodeForm, QueryRolePermissionForm, QueryTableRolePermissionForm, QueryColumnRolePermissionForm, sysConfigApi, QuerySysConfigForm, tenantApi, TenantState, TenantBaseForm, TenantIndexForm, userApi, AccountUserInfo, AuthCodeForm, BindAccountData, LoginData, LoginRes, ResetPasswordForm, UserState, versionApi, QueryAppVersionForm, weChatApi, zxingApi, QueryBarcodeForm, siteApi, QueryStaticSiteForm, QueryFileInfoForm, arcoApi, SelectOptionType, marketApi, applyApp, branchApi, pluginApi, useUserStore, createValidator, executeObjectPropsExpressions, executeArrayExpressions, SubmitFormResult, UiEventNames, Operators, CacheManager, CacheStorageType, defaultCacheManager, memoryCacheManager, GlTemplate };
|
|
113
|
+
export { hasRole, hasAnyRole, hasAllRoles, withoutRole, checkRolePermission } from './composables/useRole';
|
|
114
|
+
export default vuePlugin;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LoginData, UserState } from '../../../m/datasource/UserApi';
|
|
2
|
+
import { StoreDefinition } from 'pinia';
|
|
3
|
+
declare const useUserStore: StoreDefinition<"user", UserState, {
|
|
4
|
+
userInfo(state: UserState): UserState;
|
|
5
|
+
}, {
|
|
6
|
+
switchRoles(): Promise<unknown>;
|
|
7
|
+
setInfo(partial: Partial<UserState>): void;
|
|
8
|
+
resetInfo(): void;
|
|
9
|
+
info(successCallBack?: any): Promise<void>;
|
|
10
|
+
login(loginForm: LoginData): Promise<void>;
|
|
11
|
+
doLoginWithCode(code: string): Promise<void>;
|
|
12
|
+
doLogin(loginForm: LoginData): Promise<void>;
|
|
13
|
+
logoutCallBack(): void;
|
|
14
|
+
logout(): Promise<void>;
|
|
15
|
+
}>;
|
|
16
|
+
export default useUserStore;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 查询条件,分类
|
|
3
|
+
*/
|
|
4
|
+
declare enum Operators {
|
|
5
|
+
eq = "eq",
|
|
6
|
+
neq = "neq",
|
|
7
|
+
lt = "lt",
|
|
8
|
+
lte = "lte",
|
|
9
|
+
gt = "gt",
|
|
10
|
+
gte = "gte",
|
|
11
|
+
sw = "startWith",
|
|
12
|
+
ew = "endWith",
|
|
13
|
+
ct = "contains",
|
|
14
|
+
in = "in",
|
|
15
|
+
nin = "notin",
|
|
16
|
+
nil = "nil",
|
|
17
|
+
bt = "bt"
|
|
18
|
+
}
|
|
19
|
+
export default Operators;
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { AxiosStatic } from 'axios';
|
|
2
|
+
import { App } from 'vue';
|
|
3
|
+
import { Pinia } from 'pinia';
|
|
4
|
+
import { ApiResultStatus, CellValueType, PageStatus } from './options';
|
|
5
|
+
import { EntitySaver, EntityReader } from '../api/EntityDataSource';
|
|
6
|
+
export type GeelatoPluginOptions = {
|
|
7
|
+
app: App;
|
|
8
|
+
axios: AxiosStatic;
|
|
9
|
+
ctx?: Record<string, any>;
|
|
10
|
+
router?: any;
|
|
11
|
+
pinia?: Pinia;
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
};
|
|
14
|
+
export type I18nMessages = {
|
|
15
|
+
en: Record<string, any>;
|
|
16
|
+
cn: Record<string, any>;
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
};
|
|
19
|
+
export declare abstract class BasePlugin {
|
|
20
|
+
protected constructor(options?: GeelatoPluginOptions);
|
|
21
|
+
/**
|
|
22
|
+
* 获取插件名称,唯一标识
|
|
23
|
+
*/
|
|
24
|
+
abstract getName(): string;
|
|
25
|
+
abstract getI18nMessages(): I18nMessages;
|
|
26
|
+
abstract install(app: App): void;
|
|
27
|
+
abstract uninstall(): void;
|
|
28
|
+
}
|
|
29
|
+
export type GeelatoPlugin = {
|
|
30
|
+
setupGeelato: (options?: GeelatoPluginOptions) => any;
|
|
31
|
+
install: (app: App) => any;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Geelato 全局对象类型定义
|
|
35
|
+
*/
|
|
36
|
+
export interface Geelato {
|
|
37
|
+
id: string;
|
|
38
|
+
user: {
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
jobNumber: string;
|
|
42
|
+
mobilePhone: string;
|
|
43
|
+
email: string;
|
|
44
|
+
orgId: string;
|
|
45
|
+
orgName: string;
|
|
46
|
+
corpId: string;
|
|
47
|
+
corpName: string;
|
|
48
|
+
companyExtendId: string;
|
|
49
|
+
cooperatingOrgId: string;
|
|
50
|
+
};
|
|
51
|
+
app: {
|
|
52
|
+
id: string;
|
|
53
|
+
name: string;
|
|
54
|
+
version: string;
|
|
55
|
+
};
|
|
56
|
+
tenant: {
|
|
57
|
+
id: string;
|
|
58
|
+
name: string;
|
|
59
|
+
};
|
|
60
|
+
sys: object;
|
|
61
|
+
device: {
|
|
62
|
+
viewport: {
|
|
63
|
+
width: string;
|
|
64
|
+
height: string;
|
|
65
|
+
};
|
|
66
|
+
networkType: string;
|
|
67
|
+
};
|
|
68
|
+
page: {
|
|
69
|
+
id?: string;
|
|
70
|
+
label?: string;
|
|
71
|
+
status?: string;
|
|
72
|
+
template?: any;
|
|
73
|
+
templateName?: string;
|
|
74
|
+
params?: Array<Param>;
|
|
75
|
+
};
|
|
76
|
+
inst: Record<string, any>;
|
|
77
|
+
ref: Record<string, any>;
|
|
78
|
+
insts: Record<string, Record<string, any>>;
|
|
79
|
+
refs: Record<string, Record<string, any>>;
|
|
80
|
+
ctx: {
|
|
81
|
+
record: Record<string, any>;
|
|
82
|
+
pageProxy?: any;
|
|
83
|
+
[key: string]: any;
|
|
84
|
+
};
|
|
85
|
+
fn: {
|
|
86
|
+
[key: string]: any;
|
|
87
|
+
if: (expression: string, trueValue: any, falseValue: any) => any;
|
|
88
|
+
isPageParamEquals: (paramName: string, value: any) => boolean;
|
|
89
|
+
openModal: (options: Record<string, any>) => any;
|
|
90
|
+
openDrawer: (options: Record<string, any>) => any;
|
|
91
|
+
openWin: (url: string, urlParams: Array<Param>, gl?: Geelato) => void;
|
|
92
|
+
loadPage: (pageId: string, extendId: string, params: Array<Param>, pageStatus: string, pageTemplateName?: string, pageTemplateProps?: Record<string, any>, gl?: Geelato) => any;
|
|
93
|
+
loadComponent: (componentName: string, props: Record<string, any>) => any;
|
|
94
|
+
invokeComponentMethod: (componentId: string, methodName: string, params: Array<Param>, gl?: Geelato) => any;
|
|
95
|
+
keyValue: (keys: string | Array<string>, keyValues: Record<string, any>) => string;
|
|
96
|
+
getPageParams: (gl?: Geelato) => Array<Param> | null;
|
|
97
|
+
getPageParam: (paramName: string, gl?: Geelato) => any;
|
|
98
|
+
hasPageParam: (paramName: string, gl?: Geelato) => boolean;
|
|
99
|
+
isPageStatusRead: () => boolean;
|
|
100
|
+
isPageStatusCreate: () => boolean;
|
|
101
|
+
isPageStatusCopyCreate: () => boolean;
|
|
102
|
+
isPageStatusCreateOrCopyCreate: () => boolean;
|
|
103
|
+
isPageStatusUpdate: () => boolean;
|
|
104
|
+
getComponentMethod: (componentId: string, methodName: string) => Function | null;
|
|
105
|
+
getComponentValue: (componentId: string) => any;
|
|
106
|
+
setComponentValue: (componentId: string, value: any) => any;
|
|
107
|
+
getComponentProps: (componentId: string) => any;
|
|
108
|
+
setComponentProps: (componentId: string, props: Record<string, any>) => void;
|
|
109
|
+
triggerComponentAction: (componentId: string, actionName: string, ctx?: Record<string, any>, callback?: Function, gl?: Geelato) => Promise<any>;
|
|
110
|
+
convertEntityReader: (entityReader: EntityReader, gl?: Geelato) => EntityReader;
|
|
111
|
+
convertEntitySaver: (entitySaver: EntitySaver, gl?: Geelato) => EntitySaver;
|
|
112
|
+
notification: any;
|
|
113
|
+
message: any;
|
|
114
|
+
confirm: any;
|
|
115
|
+
log: (options: Record<string, any>) => void;
|
|
116
|
+
createAxios: (config: any, params: {
|
|
117
|
+
widthDefaultHeader: boolean;
|
|
118
|
+
}) => AxiosStatic;
|
|
119
|
+
};
|
|
120
|
+
entityApi: any;
|
|
121
|
+
fileApi: any;
|
|
122
|
+
sysApi: any;
|
|
123
|
+
date: any;
|
|
124
|
+
vars: Record<string, any>;
|
|
125
|
+
$notification?: any;
|
|
126
|
+
$message?: any;
|
|
127
|
+
$modal?: any;
|
|
128
|
+
$drawer?: any;
|
|
129
|
+
[key: string]: any;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* 加载页面的配置信息
|
|
133
|
+
*/
|
|
134
|
+
export type PageConfig = {
|
|
135
|
+
pageId: string;
|
|
136
|
+
extendId?: string;
|
|
137
|
+
params: Array<Param>;
|
|
138
|
+
pageStatus?: PageStatus;
|
|
139
|
+
pageTemplateName?: string;
|
|
140
|
+
pageTemplateProps?: object;
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* 页面接受的参数定义
|
|
144
|
+
* 便于其它页面在调用时,清楚应传入的参数
|
|
145
|
+
*/
|
|
146
|
+
export interface ParamMeta {
|
|
147
|
+
name: string;
|
|
148
|
+
title?: string;
|
|
149
|
+
required?: boolean;
|
|
150
|
+
type?: any;
|
|
151
|
+
description?: string;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* 页面参数、方法调用参数
|
|
155
|
+
*/
|
|
156
|
+
export interface Param {
|
|
157
|
+
title?: string;
|
|
158
|
+
name: string;
|
|
159
|
+
value: any;
|
|
160
|
+
valueExpression?: string | object;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* api 查询返回结果
|
|
164
|
+
*/
|
|
165
|
+
export interface ApiResult<T = any> {
|
|
166
|
+
msg: string;
|
|
167
|
+
code: number;
|
|
168
|
+
status: ApiResultStatus;
|
|
169
|
+
data: T;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* api 分页查询返回结果
|
|
173
|
+
*/
|
|
174
|
+
export interface ApiPagedResult extends ApiResult {
|
|
175
|
+
total: number;
|
|
176
|
+
page: number;
|
|
177
|
+
size: number;
|
|
178
|
+
dataSize: number;
|
|
179
|
+
meta?: object;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* 组件实体权限
|
|
183
|
+
*/
|
|
184
|
+
export interface InstPermission {
|
|
185
|
+
code: string;
|
|
186
|
+
rule: string;
|
|
187
|
+
}
|
|
188
|
+
export interface CellMeta {
|
|
189
|
+
name: string;
|
|
190
|
+
valueType: CellValueType;
|
|
191
|
+
}
|
|
192
|
+
export type PdfAnnotationArea = {
|
|
193
|
+
width: number;
|
|
194
|
+
height: number;
|
|
195
|
+
x: number;
|
|
196
|
+
y: number;
|
|
197
|
+
pageIndex: number;
|
|
198
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare enum PageType {
|
|
2
|
+
freePage = "freePage",
|
|
3
|
+
formPage = "formPage",
|
|
4
|
+
listPage = "listPage",
|
|
5
|
+
tableEditPage = "tableEditPage",
|
|
6
|
+
blockPage = "blockPage",
|
|
7
|
+
emptyPage = "emptyPage",
|
|
8
|
+
flowPage = "flowPage"
|
|
9
|
+
}
|
|
10
|
+
export declare enum PageStatus {
|
|
11
|
+
none = "none",
|
|
12
|
+
read = "read",
|
|
13
|
+
create = "create",
|
|
14
|
+
copyCreate = "copyCreate",
|
|
15
|
+
update = "update"
|
|
16
|
+
}
|
|
17
|
+
export declare enum ApiResultStatus {
|
|
18
|
+
SUCCESS = "ok",
|
|
19
|
+
FAIL = "fail"
|
|
20
|
+
}
|
|
21
|
+
export declare const FILE_MIME: {
|
|
22
|
+
label: string;
|
|
23
|
+
value: string;
|
|
24
|
+
}[];
|
|
25
|
+
export declare const IMAGE_MIME: string[];
|
|
26
|
+
export declare enum CellValueType {
|
|
27
|
+
STRING = "STRING",
|
|
28
|
+
NUMBER = "NUMBER",
|
|
29
|
+
DATE = "DATE",
|
|
30
|
+
DATETIME = "DATETIME"
|
|
31
|
+
}
|
|
32
|
+
export declare const CellValueTypeOptions: {
|
|
33
|
+
label: string;
|
|
34
|
+
value: string;
|
|
35
|
+
}[];
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AppState } from '../m/datasource/ApplicationApi.ts';
|
|
2
|
+
declare const getToken: () => string;
|
|
3
|
+
declare const isLogin: () => boolean;
|
|
4
|
+
declare const setToken: (token: string) => void;
|
|
5
|
+
declare const clearToken: () => void;
|
|
6
|
+
declare const getBearer: () => string | null;
|
|
7
|
+
declare const setBearer: () => void;
|
|
8
|
+
declare const isBearer: () => boolean;
|
|
9
|
+
declare const setJWTBearer: () => void;
|
|
10
|
+
declare const clearBearer: () => void;
|
|
11
|
+
declare const getBearerToken: () => string;
|
|
12
|
+
declare const setBearerToken: (bearer: string, token: string) => void;
|
|
13
|
+
declare const clearBearerToken: () => void;
|
|
14
|
+
declare const getTenant: () => string | null;
|
|
15
|
+
declare const setTenant: (tenant: string) => void;
|
|
16
|
+
declare const clearTenant: () => void;
|
|
17
|
+
declare const getSsoUrl: () => string;
|
|
18
|
+
declare const setSsoUrl: (url: string) => void;
|
|
19
|
+
declare const clearSsoUrl: () => void;
|
|
20
|
+
declare const isValidUser: () => boolean;
|
|
21
|
+
declare const getValidUser: () => string | null;
|
|
22
|
+
declare const setValidUser: (value: string) => void;
|
|
23
|
+
declare const clearValidUser: () => void;
|
|
24
|
+
declare const getArcoLocale: () => string;
|
|
25
|
+
declare const setArcoLocale: (value: string) => void;
|
|
26
|
+
declare const getCurrentLocale: () => "en" | "cn";
|
|
27
|
+
declare const getGlobalSettings: () => any;
|
|
28
|
+
declare const setGlobalSettings: (state: AppState) => void;
|
|
29
|
+
declare const updateGlobalSettings: (state: AppState) => void;
|
|
30
|
+
declare const clearGlobalSettings: () => void;
|
|
31
|
+
type TargetContext = '_self' | '_parent' | '_blank' | '_top';
|
|
32
|
+
declare const openWindow: (url: string, opts?: {
|
|
33
|
+
target?: TargetContext;
|
|
34
|
+
[key: string]: any;
|
|
35
|
+
}) => void;
|
|
36
|
+
declare const regexUrl: RegExp;
|
|
37
|
+
export { isLogin, getToken, setToken, clearToken, getBearer, setBearer, isBearer, setJWTBearer, clearBearer, getBearerToken, setBearerToken, clearBearerToken, getTenant, setTenant, clearTenant, getSsoUrl, setSsoUrl, clearSsoUrl, isValidUser, getValidUser, setValidUser, clearValidUser, getArcoLocale, setArcoLocale, getCurrentLocale, openWindow, regexUrl, getGlobalSettings, setGlobalSettings, updateGlobalSettings, clearGlobalSettings, };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 缓存存储类型
|
|
3
|
+
*/
|
|
4
|
+
export declare enum CacheStorageType {
|
|
5
|
+
MEMORY = "memory",
|
|
6
|
+
LOCAL_STORAGE = "localStorage",
|
|
7
|
+
SESSION_STORAGE = "sessionStorage"
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 缓存项接口
|
|
11
|
+
*/
|
|
12
|
+
export interface CacheItem {
|
|
13
|
+
key: string;
|
|
14
|
+
value: any;
|
|
15
|
+
type: string;
|
|
16
|
+
typeName: string;
|
|
17
|
+
timestamp: number;
|
|
18
|
+
expireTime?: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 缓存配置接口
|
|
22
|
+
*/
|
|
23
|
+
export interface CacheConfig {
|
|
24
|
+
storageType: CacheStorageType;
|
|
25
|
+
defaultExpireTime?: number;
|
|
26
|
+
maxSize?: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 缓存管理器
|
|
30
|
+
*/
|
|
31
|
+
export declare class CacheManager {
|
|
32
|
+
private config;
|
|
33
|
+
private memoryCache;
|
|
34
|
+
private readonly CACHE_PREFIX;
|
|
35
|
+
static isCacheEnabled: boolean;
|
|
36
|
+
constructor(config?: CacheConfig);
|
|
37
|
+
/**
|
|
38
|
+
* 设置缓存
|
|
39
|
+
* @param key 缓存键
|
|
40
|
+
* @param value 缓存值
|
|
41
|
+
* @param type 缓存类型标识
|
|
42
|
+
* @param typeName 缓存类型中文名称
|
|
43
|
+
* @param expireTime 过期时间(毫秒),可选
|
|
44
|
+
*/
|
|
45
|
+
set(key: string, value: any, type: string, typeName: string, expireTime?: number): void;
|
|
46
|
+
/**
|
|
47
|
+
* 获取缓存
|
|
48
|
+
* @param key 缓存键
|
|
49
|
+
* @returns 缓存值或null
|
|
50
|
+
*/
|
|
51
|
+
get(key: string): any;
|
|
52
|
+
/**
|
|
53
|
+
* 删除指定缓存
|
|
54
|
+
* @param key 缓存键
|
|
55
|
+
*/
|
|
56
|
+
remove(key: string): void;
|
|
57
|
+
/**
|
|
58
|
+
* 按前缀删除缓存
|
|
59
|
+
* @param prefix 缓存键前缀
|
|
60
|
+
*/
|
|
61
|
+
removeByPrefix(prefix: string): void;
|
|
62
|
+
/**
|
|
63
|
+
* 按类型删除缓存
|
|
64
|
+
* @param type 缓存类型
|
|
65
|
+
*/
|
|
66
|
+
removeByType(type: string): void;
|
|
67
|
+
/**
|
|
68
|
+
* 批量删除缓存
|
|
69
|
+
* @param keys 缓存键数组
|
|
70
|
+
*/
|
|
71
|
+
removeBatch(keys: string[]): void;
|
|
72
|
+
/**
|
|
73
|
+
* 清空所有缓存
|
|
74
|
+
*/
|
|
75
|
+
clear(): void;
|
|
76
|
+
/**
|
|
77
|
+
* 获取所有缓存键
|
|
78
|
+
*/
|
|
79
|
+
getAllKeys(): string[];
|
|
80
|
+
/**
|
|
81
|
+
* 获取所有缓存项
|
|
82
|
+
*/
|
|
83
|
+
getAllItems(): CacheItem[];
|
|
84
|
+
/**
|
|
85
|
+
* 按类型获取缓存项
|
|
86
|
+
* @param type 缓存类型
|
|
87
|
+
*/
|
|
88
|
+
getItemsByType(type: string): CacheItem[];
|
|
89
|
+
/**
|
|
90
|
+
* 获取缓存统计信息
|
|
91
|
+
*/
|
|
92
|
+
getStats(): {
|
|
93
|
+
total: number;
|
|
94
|
+
byType: Record<string, number>;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* 清理过期缓存
|
|
98
|
+
*/
|
|
99
|
+
cleanExpired(): void;
|
|
100
|
+
private setMemoryCache;
|
|
101
|
+
private getMemoryCache;
|
|
102
|
+
private setStorageCache;
|
|
103
|
+
private getStorageCache;
|
|
104
|
+
private clearStorage;
|
|
105
|
+
private getStorageKeys;
|
|
106
|
+
private getAllStorageItems;
|
|
107
|
+
private isExpired;
|
|
108
|
+
}
|
|
109
|
+
export declare const defaultCacheManager: CacheManager;
|
|
110
|
+
export declare const memoryCacheManager: CacheManager;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CellMeta } from '../types/global.ts';
|
|
2
|
+
export default class ClipboardUtil {
|
|
3
|
+
/**
|
|
4
|
+
* 复制文本到剪贴板
|
|
5
|
+
* @param value 要复制的文本
|
|
6
|
+
* @param successCallBack 复制成功回调
|
|
7
|
+
* @param failCallBack 复制失败回调
|
|
8
|
+
*/
|
|
9
|
+
static copyToClipboard: (value: string, successCallBack?: any, failCallBack?: any) => Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* 读取剪贴板上的文本,并解析为表格数据
|
|
12
|
+
* @param splitChar 单元格分割符,默认为制表符"\t",如果是读取cvs的数据,可以传入逗号","
|
|
13
|
+
* @param cellMetas 单元格元数据,用于处理特殊情况,比如日、数字等;同时也限定了需要读取的列,如果为空则读取所有列
|
|
14
|
+
* @returns 返回一个包含header和data的对象,如果读取失败则返回null
|
|
15
|
+
*/
|
|
16
|
+
static readClipboardTable(splitChar: string | undefined, cellMetas: CellMeta[]): Promise<{
|
|
17
|
+
header: string[];
|
|
18
|
+
data: any[];
|
|
19
|
+
} | null>;
|
|
20
|
+
/**
|
|
21
|
+
* 读取剪贴板上的图片
|
|
22
|
+
*/
|
|
23
|
+
static readClipboardImage(): Promise<File[] | null>;
|
|
24
|
+
}
|