@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,127 @@
|
|
|
1
|
+
import { PageQueryResponse, QueryResult } from './Base';
|
|
2
|
+
import { AxiosResponse } from 'axios';
|
|
3
|
+
export interface QueryDictItemForm {
|
|
4
|
+
id: string;
|
|
5
|
+
pid: string;
|
|
6
|
+
dictId: string;
|
|
7
|
+
itemCode: string;
|
|
8
|
+
itemName: string;
|
|
9
|
+
itemNameEn: string;
|
|
10
|
+
itemColor: string;
|
|
11
|
+
itemTag: string;
|
|
12
|
+
itemExtra: string;
|
|
13
|
+
itemRemark: string;
|
|
14
|
+
enableStatus: number;
|
|
15
|
+
seqNo: number;
|
|
16
|
+
appId: string;
|
|
17
|
+
tenantCode: string;
|
|
18
|
+
children?: QueryDictItemForm[];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 分页查询
|
|
22
|
+
* @param params
|
|
23
|
+
*/
|
|
24
|
+
export declare function pageQueryDictItem(params: Record<string, any>): Promise< AxiosResponse<PageQueryResponse, any>>;
|
|
25
|
+
/**
|
|
26
|
+
* 条件查询
|
|
27
|
+
* @param params
|
|
28
|
+
*/
|
|
29
|
+
export declare function queryDictItems(params: Record<string, any>): Promise< AxiosResponse<QueryDictItemForm[], any>>;
|
|
30
|
+
/**
|
|
31
|
+
* 单条查询
|
|
32
|
+
* @param id
|
|
33
|
+
*/
|
|
34
|
+
export declare function getDictItem(id: string): Promise< AxiosResponse<QueryDictItemForm, any>>;
|
|
35
|
+
/**
|
|
36
|
+
* 创建或更新
|
|
37
|
+
* @param params
|
|
38
|
+
*/
|
|
39
|
+
export declare function createOrUpdateDictItem(params: QueryDictItemForm): Promise< AxiosResponse<QueryResult, any>>;
|
|
40
|
+
/**
|
|
41
|
+
* 批量创建或更新
|
|
42
|
+
* @param dictId 字典ID
|
|
43
|
+
* @param parentId 字典项父级id
|
|
44
|
+
* @param params 字典项集合
|
|
45
|
+
*/
|
|
46
|
+
export declare function batchCreateOrUpdateDictItem(dictId: string, parentId: string, params: QueryDictItemForm[]): Promise< AxiosResponse<QueryResult, any>>;
|
|
47
|
+
/**
|
|
48
|
+
* 删除
|
|
49
|
+
* @param id
|
|
50
|
+
*/
|
|
51
|
+
export declare function deleteDictItem(id: string): Promise< AxiosResponse<QueryResult, any>>;
|
|
52
|
+
/**
|
|
53
|
+
* 校验字典项编码
|
|
54
|
+
* @param params
|
|
55
|
+
*/
|
|
56
|
+
export declare function validateDictItemCode(params: QueryDictItemForm): Promise< AxiosResponse<boolean, any>>;
|
|
57
|
+
/**
|
|
58
|
+
* 根据字典编码查询字典项
|
|
59
|
+
* @param dictCode
|
|
60
|
+
*/
|
|
61
|
+
export declare function queryItemByDictCode(dictCode: string): Promise< AxiosResponse<any, any>>;
|
|
62
|
+
/**
|
|
63
|
+
* 根据字典id或字典编码查询字典项标签
|
|
64
|
+
* @param dictId
|
|
65
|
+
* @param dictCode
|
|
66
|
+
*/
|
|
67
|
+
export declare function queryItemTagsByDict(dictId?: string, dictCode?: string): Promise< AxiosResponse<any, any>>;
|
|
68
|
+
export interface QueryDictForm {
|
|
69
|
+
id: string;
|
|
70
|
+
tenantCode: string;
|
|
71
|
+
appId: string;
|
|
72
|
+
dictName: string;
|
|
73
|
+
dictNameEn: string;
|
|
74
|
+
dictCode: string;
|
|
75
|
+
dictColor: string;
|
|
76
|
+
dictRemark: string;
|
|
77
|
+
enableStatus: number;
|
|
78
|
+
seqNo: number;
|
|
79
|
+
dictItems?: QueryDictItemForm[];
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* 分页查询
|
|
83
|
+
* @param params
|
|
84
|
+
*/
|
|
85
|
+
export declare function pageQueryDict(params: Record<string, any>): Promise< AxiosResponse<PageQueryResponse, any>>;
|
|
86
|
+
/**
|
|
87
|
+
* 条件查询
|
|
88
|
+
* @param params
|
|
89
|
+
*/
|
|
90
|
+
export declare function queryDicts(params: Record<string, any>): Promise< AxiosResponse<QueryDictForm[], any>>;
|
|
91
|
+
/**
|
|
92
|
+
* 单条查询
|
|
93
|
+
* @param id
|
|
94
|
+
*/
|
|
95
|
+
export declare function getDict(id: string): Promise< AxiosResponse<QueryDictForm, any>>;
|
|
96
|
+
/**
|
|
97
|
+
* 创建或更新
|
|
98
|
+
* @param params
|
|
99
|
+
*/
|
|
100
|
+
export declare function createOrUpdateDict(params: QueryDictForm): Promise< AxiosResponse<QueryResult, any>>;
|
|
101
|
+
/**
|
|
102
|
+
* 删除
|
|
103
|
+
* @param id
|
|
104
|
+
*/
|
|
105
|
+
export declare function deleteDict(id: string): Promise< AxiosResponse<QueryResult, any>>;
|
|
106
|
+
/**
|
|
107
|
+
* 校验字典编码
|
|
108
|
+
* @param params
|
|
109
|
+
*/
|
|
110
|
+
export declare function validateDictCode(params: QueryDictForm): Promise< AxiosResponse<boolean, any>>;
|
|
111
|
+
/**
|
|
112
|
+
* 创建字典及字典项
|
|
113
|
+
* @param params
|
|
114
|
+
*/
|
|
115
|
+
export declare function createDictAndItems(params: QueryDictForm): Promise< AxiosResponse<QueryResult, any>>;
|
|
116
|
+
/**
|
|
117
|
+
* 导出 - 数据字典
|
|
118
|
+
* @param fileName
|
|
119
|
+
* @param map
|
|
120
|
+
* @param list
|
|
121
|
+
*/
|
|
122
|
+
export declare const exportDictionary: (fileName: string, map?: Record<string, any>, list?: any[]) => Promise<void>;
|
|
123
|
+
/**
|
|
124
|
+
* 导出数据字典
|
|
125
|
+
* @param data
|
|
126
|
+
*/
|
|
127
|
+
export declare const exportDictAndItems: (dictId: string) => Promise<void>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AxiosResponse } from 'axios';
|
|
2
|
+
export interface DictionaryItem {
|
|
3
|
+
itemCode: string;
|
|
4
|
+
itemName: string;
|
|
5
|
+
}
|
|
6
|
+
export interface DictionaryResponse<T = DictionaryItem[]> {
|
|
7
|
+
msg: string;
|
|
8
|
+
code: number;
|
|
9
|
+
status: string;
|
|
10
|
+
data: T;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 根据数据字典编码获取字典项列表
|
|
14
|
+
* 使用统一拦截器的 axios 实例
|
|
15
|
+
*/
|
|
16
|
+
export declare function getByCode(code: string): Promise< AxiosResponse<DictionaryResponse<DictionaryItem[]>, any>>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { PageQueryResponse, QueryResult } from './Base';
|
|
2
|
+
import { AxiosResponse } from 'axios';
|
|
3
|
+
export interface EncodingItem {
|
|
4
|
+
id: string;
|
|
5
|
+
itemType: string;
|
|
6
|
+
seqNo: number;
|
|
7
|
+
constantValue: string;
|
|
8
|
+
businessDict: string;
|
|
9
|
+
dateType: string;
|
|
10
|
+
serialDigit: number;
|
|
11
|
+
serialType: string;
|
|
12
|
+
coverPos: boolean;
|
|
13
|
+
randomRange: string;
|
|
14
|
+
validate: boolean;
|
|
15
|
+
errorMsg: string;
|
|
16
|
+
}
|
|
17
|
+
export interface QueryEncodingForm {
|
|
18
|
+
id: string;
|
|
19
|
+
title: string;
|
|
20
|
+
template: string;
|
|
21
|
+
separators: string;
|
|
22
|
+
example: string;
|
|
23
|
+
enableStatus: number;
|
|
24
|
+
description: string;
|
|
25
|
+
appId: string;
|
|
26
|
+
tenantCode: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 分页查询
|
|
30
|
+
* @param params
|
|
31
|
+
*/
|
|
32
|
+
export declare function pageQueryEncoding(params: Record<string, any>): Promise< AxiosResponse<PageQueryResponse, any>>;
|
|
33
|
+
/**
|
|
34
|
+
* 条件查询
|
|
35
|
+
* @param params
|
|
36
|
+
*/
|
|
37
|
+
export declare function queryEncodings(params: Record<string, any>): Promise< AxiosResponse<QueryEncodingForm[], any>>;
|
|
38
|
+
/**
|
|
39
|
+
* 单条查询
|
|
40
|
+
* @param id
|
|
41
|
+
*/
|
|
42
|
+
export declare function getEncoding(id: string): Promise< AxiosResponse<QueryEncodingForm, any>>;
|
|
43
|
+
/**
|
|
44
|
+
* 创建或更新
|
|
45
|
+
* @param params
|
|
46
|
+
*/
|
|
47
|
+
export declare function createOrUpdateEncoding(params: QueryEncodingForm): Promise< AxiosResponse<QueryResult, any>>;
|
|
48
|
+
/**
|
|
49
|
+
* 删除
|
|
50
|
+
* @param id
|
|
51
|
+
*/
|
|
52
|
+
export declare function deleteEncoding(id: string): Promise< AxiosResponse<QueryResult, any>>;
|
|
53
|
+
/**
|
|
54
|
+
* 获取一个新的编码,如需要使用系统编码app,需在参数中传入appId
|
|
55
|
+
* @param id 编码ID
|
|
56
|
+
* @param argumentParam params参数
|
|
57
|
+
* @param argumentBody body参数,优先级高于params参数
|
|
58
|
+
*/
|
|
59
|
+
export declare function generateCode(id: string, argumentParam?: Record<string, any>, argumentBody?: Record<string, any>): Promise< AxiosResponse<any, any>>;
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { PageQueryRequest, PageQueryResponse, QueryResult } from './Base';
|
|
2
|
+
import { ApiResult, PdfAnnotationArea } from '../../types/global.ts';
|
|
3
|
+
import { AxiosResponse } from 'axios';
|
|
4
|
+
export interface AttachmentForm {
|
|
5
|
+
id: string;
|
|
6
|
+
pid: string;
|
|
7
|
+
name: string;
|
|
8
|
+
type: string;
|
|
9
|
+
genre: string;
|
|
10
|
+
size: string;
|
|
11
|
+
path: string;
|
|
12
|
+
objectId: string;
|
|
13
|
+
formIds: string;
|
|
14
|
+
invalidTime: string;
|
|
15
|
+
batchNo: string;
|
|
16
|
+
resolution: string;
|
|
17
|
+
delStatus: number;
|
|
18
|
+
appId: string;
|
|
19
|
+
tenantCode: string;
|
|
20
|
+
source?: string;
|
|
21
|
+
storageType?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface Base64FileParams {
|
|
24
|
+
name: string;
|
|
25
|
+
size: number;
|
|
26
|
+
type: string;
|
|
27
|
+
base64: string;
|
|
28
|
+
}
|
|
29
|
+
export interface UploadFileParams {
|
|
30
|
+
serviceType?: string;
|
|
31
|
+
tableType?: string;
|
|
32
|
+
isRename?: boolean;
|
|
33
|
+
isThumbnail?: boolean;
|
|
34
|
+
onlyThumb?: boolean;
|
|
35
|
+
dimension?: string;
|
|
36
|
+
thumbScale?: string;
|
|
37
|
+
objectId?: string;
|
|
38
|
+
formIds?: string;
|
|
39
|
+
batchNo?: string;
|
|
40
|
+
invalidTime?: string;
|
|
41
|
+
validDuration?: number;
|
|
42
|
+
genre?: string;
|
|
43
|
+
root?: string;
|
|
44
|
+
appId?: string;
|
|
45
|
+
tenantCode?: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* 上传插件添加,请求表头
|
|
49
|
+
*/
|
|
50
|
+
export declare const uploadHeader: () => Record<string, string>;
|
|
51
|
+
export declare function exportFileList(params: Record<string, any>): Promise< AxiosResponse<PageQueryResponse, any>>;
|
|
52
|
+
export declare function getAttachment(id: string): Promise< AxiosResponse<AttachmentForm, any>>;
|
|
53
|
+
/**
|
|
54
|
+
* 批量获取附件信息
|
|
55
|
+
* @param ids
|
|
56
|
+
*/
|
|
57
|
+
export declare function getAttachments(ids: string): Promise< AxiosResponse<AttachmentForm[], any>>;
|
|
58
|
+
export declare function queryAttachments(params: Record<string, any>): Promise< AxiosResponse<AttachmentForm[], any>>;
|
|
59
|
+
export declare function queryAttachmentColumn(type: string): Promise< AxiosResponse<string[], any>>;
|
|
60
|
+
export declare function pageQueryAttachment(params: PageQueryRequest): Promise< AxiosResponse<PageQueryResponse, any>>;
|
|
61
|
+
export declare function replaceAttachment(sourceId: string, targetId: string, params: Record<string, any>): Promise< AxiosResponse<QueryResult, any>>;
|
|
62
|
+
export declare function updateAttachment(id: string, params: Record<string, any>): Promise< AxiosResponse<QueryResult, any>>;
|
|
63
|
+
export declare function copyAttachment(id: string, params: Record<string, any>): Promise< AxiosResponse<QueryResult, any>>;
|
|
64
|
+
export declare function quoteAttachment(id: string, params: Record<string, any>): Promise< AxiosResponse<QueryResult, any>>;
|
|
65
|
+
export declare function downloadAttachments(type: string, column: string, params: Record<string, any>): Promise< AxiosResponse<QueryResult, any>>;
|
|
66
|
+
export declare function validAttachments(ids: string): Promise< AxiosResponse<QueryResult, any>>;
|
|
67
|
+
export declare function updateStorageAttachments(type: string, ids: string): Promise< AxiosResponse<QueryResult, any>>;
|
|
68
|
+
export declare function deleteAttachments(type: string, ids: string, isRemoveFile?: boolean): Promise< AxiosResponse<QueryResult, any>>;
|
|
69
|
+
/**
|
|
70
|
+
* 删除附件。1,删除附件表信息;2,删除文件
|
|
71
|
+
* @param id 附件表id
|
|
72
|
+
* @param isRemoveFile 删除文件,默认:false
|
|
73
|
+
*/
|
|
74
|
+
export declare function deleteAttachment(id: string, isRemoveFile?: boolean): Promise< AxiosResponse<ApiResult<any>, any>>;
|
|
75
|
+
/**
|
|
76
|
+
* 上传附件
|
|
77
|
+
* @param params appId,isRename,objectId,genre,root
|
|
78
|
+
*/
|
|
79
|
+
export declare function getUploadUrl(params?: Record<string, any>): string;
|
|
80
|
+
/**
|
|
81
|
+
* 上传附件
|
|
82
|
+
* @param formData
|
|
83
|
+
* @param params
|
|
84
|
+
*/
|
|
85
|
+
export declare const updateFile: (formData: FormData, params?: Record<string, any>) => Promise< AxiosResponse<QueryResult, any>>;
|
|
86
|
+
/**
|
|
87
|
+
* 下载附件
|
|
88
|
+
* @param id 附件id
|
|
89
|
+
*/
|
|
90
|
+
export declare function getDownloadUrlById(id: string, isPdf?: boolean, isPreview?: boolean, isThumbnail?: boolean): string;
|
|
91
|
+
export declare function getDownloadUrlByUrl(id: string, baseUrl?: string, isPdf?: boolean, isPreview?: boolean, isThumbnail?: boolean): string;
|
|
92
|
+
/**
|
|
93
|
+
* 下载附件
|
|
94
|
+
* @param name 附件名称
|
|
95
|
+
* @param path 附件相对地址
|
|
96
|
+
*/
|
|
97
|
+
export declare function getDownloadUrlByPath(name: string, path: string, isPdf?: boolean, isPreview?: boolean, isThumbnail?: boolean): string;
|
|
98
|
+
/**
|
|
99
|
+
* 获取文件内容
|
|
100
|
+
* @param fileName 文件名称
|
|
101
|
+
*/
|
|
102
|
+
export declare function formDataFromFile(fileName: string): Promise< AxiosResponse<string, any>>;
|
|
103
|
+
/**
|
|
104
|
+
* 导出文件
|
|
105
|
+
* @param dataType
|
|
106
|
+
* @param templateId
|
|
107
|
+
* @param data
|
|
108
|
+
* @param fileName
|
|
109
|
+
* @param markText
|
|
110
|
+
* @param markKey
|
|
111
|
+
* @param readonly
|
|
112
|
+
* @param isDownload
|
|
113
|
+
* @param isPdf
|
|
114
|
+
*/
|
|
115
|
+
export declare function exportWps(dataType: string, templateId: string, data: Record<string, any>, fileName: string, markText?: string, markKey?: string, readonly?: boolean, isDownload?: boolean, isPdf?: boolean, index?: string, exportMode?: string): Promise< AxiosResponse<AttachmentForm, any>>;
|
|
116
|
+
/**
|
|
117
|
+
* 导出excel、word
|
|
118
|
+
* 后端依据模板类型导出相应格式的文件
|
|
119
|
+
* @param fileName 文件名称
|
|
120
|
+
* @param templateId 模型文档id
|
|
121
|
+
* @param dataType 数据类型,mql | data,数据类型有可能是前端的数据结果(data),也有可能是用于后端查询获取数据结果的(mql)
|
|
122
|
+
* @param data 数据
|
|
123
|
+
* @param readonly 是否只读
|
|
124
|
+
* @param waterMark {markKey:水印样式选定,markText:水印文本,默认样式} 水印
|
|
125
|
+
* @param isDownload 是否下载
|
|
126
|
+
* @param isPdf 是否转为pdf
|
|
127
|
+
*/
|
|
128
|
+
export declare function exportFile(fileName: string, templateId: string, dataType: string, data: object, readonly?: boolean, waterMark?: Record<string, any>, isDownload?: boolean, isPdf?: boolean, index?: string, exportMode?: string): Promise< AxiosResponse<any, any>>;
|
|
129
|
+
/**
|
|
130
|
+
* 传递 表头、数据定义、业务数据,导出excel
|
|
131
|
+
* @param fileName 文件名称
|
|
132
|
+
* @param data { column;meta;values}
|
|
133
|
+
* column: GlTableExportColumn[]; // 表格数据
|
|
134
|
+
* meta: BusinessMetaData[]; // 元数据
|
|
135
|
+
* valueMap: Record<string, any>; // 变量值
|
|
136
|
+
* valueMapList:[{ list: Record<string, any>[];}] // 业务数据
|
|
137
|
+
* @param params 其他参数
|
|
138
|
+
* readonly 只读
|
|
139
|
+
* waterMark {markKey:水印样式选定,markText:水印文本,默认样式} 水印
|
|
140
|
+
* isDownload 是否下载
|
|
141
|
+
* isPdf 是否转为pdf
|
|
142
|
+
*/
|
|
143
|
+
export declare function exportExcelByColumnMeta(fileName: string, data: object, params?: Record<string, any>): Promise< AxiosResponse<any, any>>;
|
|
144
|
+
/**
|
|
145
|
+
* 导出excel
|
|
146
|
+
* @param fileName 文件名称
|
|
147
|
+
* @param templateId 模型文档id
|
|
148
|
+
* @param dataType 数据类型,mql | data,数据类型有可能是前端的数据结果(data),也有可能是用于后端查询获取数据结果的(mql)
|
|
149
|
+
* @param data 数据
|
|
150
|
+
* @param params 其他参数
|
|
151
|
+
*/
|
|
152
|
+
export declare function exportExcel(fileName: string, templateId: string, dataType: string, data: object, params?: Record<string, any>, index?: string): Promise< AxiosResponse<any, any>>;
|
|
153
|
+
/**
|
|
154
|
+
* 导入excel
|
|
155
|
+
* @param templateId 模型文档id
|
|
156
|
+
* @param attachId 已上传的数据文件id,如已上传的Excel文件id
|
|
157
|
+
* @param importType 导入的方式,"part"部分成功也导入,"all"全部成功才导入
|
|
158
|
+
*/
|
|
159
|
+
export declare function importFile(templateId: string, attachId: string, importType?: string): Promise< AxiosResponse<any, any>>;
|
|
160
|
+
/**
|
|
161
|
+
* 校验文件是否存在
|
|
162
|
+
* @param url
|
|
163
|
+
* @param success
|
|
164
|
+
* @param failed
|
|
165
|
+
*/
|
|
166
|
+
export declare const checkFileExists: (url: string, success: any, failed: any) => Promise<void>;
|
|
167
|
+
/**
|
|
168
|
+
* 检验文件是否存在,下载文件
|
|
169
|
+
* @param id 文件id
|
|
170
|
+
*/
|
|
171
|
+
export declare const fetchFileById: (id: string, fetchFailed?: any, successBack?: any, failBack?: any) => void;
|
|
172
|
+
/**
|
|
173
|
+
* 文件下载
|
|
174
|
+
* @param id
|
|
175
|
+
* @param isPdf 是否转成pdf下载
|
|
176
|
+
*/
|
|
177
|
+
export declare function downloadFileById(id: string, isPdf?: boolean, isPreview?: boolean): void;
|
|
178
|
+
/**
|
|
179
|
+
* 预览附件(显式调用)
|
|
180
|
+
* @param id 附件id
|
|
181
|
+
* @param isPdf 是否转成pdf后预览
|
|
182
|
+
*/
|
|
183
|
+
export declare function previewFileById(id: string, isPdf?: boolean): void;
|
|
184
|
+
/**
|
|
185
|
+
* 获取导入模板信息
|
|
186
|
+
* @param templateId
|
|
187
|
+
*/
|
|
188
|
+
export declare function getImportTemplateInfo(templateId: string): Promise< AxiosResponse<any, any>>;
|
|
189
|
+
/**
|
|
190
|
+
* 将blob对象转为下载链接
|
|
191
|
+
* @param blob
|
|
192
|
+
* @param fileName
|
|
193
|
+
* @param target
|
|
194
|
+
*/
|
|
195
|
+
export declare const blobToLink: (blob: Blob | MediaSource, fileName: string, target?: string) => void;
|
|
196
|
+
/**
|
|
197
|
+
* 下载导入模板文件
|
|
198
|
+
* @param templateId
|
|
199
|
+
*/
|
|
200
|
+
export declare function downloadImportTemplateFile(templateId: string): void;
|
|
201
|
+
/**
|
|
202
|
+
* 将base64编码的字符串转为文件,并下载
|
|
203
|
+
* @param base64Str base64编码字符串
|
|
204
|
+
* @param fileType 文件mine
|
|
205
|
+
* @param fileName 文件名称
|
|
206
|
+
*/
|
|
207
|
+
export declare const downloadFileByBase64: (base64Str: string, fileType: string, fileName: string) => void;
|
|
208
|
+
/**
|
|
209
|
+
* 将base64编码的字符串转为文件,并下载
|
|
210
|
+
* @param base64Data Base64FileParams
|
|
211
|
+
*/
|
|
212
|
+
export declare const downloadFileByBase64Data: (base64Data: Base64FileParams) => void;
|
|
213
|
+
/**
|
|
214
|
+
* 将base64编码的字符串转为文件,并下载
|
|
215
|
+
* @param base64String base64编码字符串
|
|
216
|
+
*/
|
|
217
|
+
export declare const downloadFileByBase64String: (base64String: string) => void;
|
|
218
|
+
/**
|
|
219
|
+
* 检查文件是否存在,将文件转为base64编码字符串
|
|
220
|
+
* @param id
|
|
221
|
+
* @param callBack
|
|
222
|
+
*/
|
|
223
|
+
export declare const fetchFileToBase64: (id: string, callBack?: any) => Promise<void>;
|
|
224
|
+
/**
|
|
225
|
+
* 批量获取附件信息
|
|
226
|
+
* @param ids
|
|
227
|
+
* @param successBack
|
|
228
|
+
* @param failBack
|
|
229
|
+
*/
|
|
230
|
+
export declare const getAttachmentByIds: (ids: string, successBack?: any, failBack?: any) => Promise<void>;
|
|
231
|
+
/**
|
|
232
|
+
* 获取解析之后的pdf数据
|
|
233
|
+
* @param fileId 服务端已存在的PDF文件ID
|
|
234
|
+
* @param templateId 与该PDF文件对应的解析模板ID
|
|
235
|
+
* @param wholeContent 是否获取整个PDF文件的内容,默认为false
|
|
236
|
+
*/
|
|
237
|
+
export declare function getParsedPdfData(fileId: string, templateId: string, wholeContent?: boolean): Promise< AxiosResponse<any, any>>;
|
|
238
|
+
/**
|
|
239
|
+
* 清除PDF文件中的指定区域内容,并重新生成PDF文件
|
|
240
|
+
* @param fileId 服务端已存在的PDF文件ID
|
|
241
|
+
* @param clearAnnotationAreas 需清除的区域内容,多个区域采用数组
|
|
242
|
+
* @returns 生成的PDF文件ID
|
|
243
|
+
*/
|
|
244
|
+
export declare function clearPdfData(fileId: string, clearAnnotationAreas: PdfAnnotationArea[]): Promise<string>;
|
|
245
|
+
/**
|
|
246
|
+
* 压缩文件
|
|
247
|
+
* @param fileId 服务端已存在的PDF文件ID
|
|
248
|
+
* @param serviceType;invalidTime "2024-10-10 12:12:12";genre:文件分类,如order;amount;
|
|
249
|
+
* batchNo:批次号,多个用逗号分隔,需要打包的附件批次集合,用","分割,如果选了这个amount:压缩比率,如0.5;genre:文件分类,如order;invalidTime:失效时间
|
|
250
|
+
* @returns 生成的PDF文件ID
|
|
251
|
+
*/
|
|
252
|
+
export declare function packByFileIds(params: {
|
|
253
|
+
fileName: string;
|
|
254
|
+
attachmentIds: string;
|
|
255
|
+
amount: number;
|
|
256
|
+
serviceType?: string;
|
|
257
|
+
invalidTime?: string;
|
|
258
|
+
genre?: string;
|
|
259
|
+
}): Promise<string>;
|
|
260
|
+
export declare function packByBatch(params: {
|
|
261
|
+
fileName: string;
|
|
262
|
+
batchNos?: string;
|
|
263
|
+
amount: number;
|
|
264
|
+
serviceType?: string;
|
|
265
|
+
invalidTime?: string;
|
|
266
|
+
genre?: string;
|
|
267
|
+
}): Promise<string>;
|
|
268
|
+
/**
|
|
269
|
+
* 前端导出Excel
|
|
270
|
+
* @param html table html content
|
|
271
|
+
* @param fileName
|
|
272
|
+
*/
|
|
273
|
+
export declare function exportExcelFromHtml(html: string, fileName: string): void;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { PageQueryResponse, QueryResult } from './Base';
|
|
2
|
+
import { QueryTableColumnForm } from './ModelApi';
|
|
3
|
+
import { AxiosResponse } from 'axios';
|
|
4
|
+
export interface BusinessTypeData {
|
|
5
|
+
name: string;
|
|
6
|
+
type: string;
|
|
7
|
+
format: string;
|
|
8
|
+
remark: string;
|
|
9
|
+
sign?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface BusinessRuleData {
|
|
12
|
+
columnName: string;
|
|
13
|
+
type: string;
|
|
14
|
+
rule: string;
|
|
15
|
+
goal: string;
|
|
16
|
+
priority: boolean;
|
|
17
|
+
retain: boolean;
|
|
18
|
+
order: number;
|
|
19
|
+
remark: string;
|
|
20
|
+
columnNameArr?: string[];
|
|
21
|
+
ruleTableName?: string;
|
|
22
|
+
ruleColumnName?: string[];
|
|
23
|
+
ruleQueryOptions?: QueryTableColumnForm[];
|
|
24
|
+
sign?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface BusinessMetaData {
|
|
27
|
+
tableName: string;
|
|
28
|
+
columnName: string;
|
|
29
|
+
evaluation: string;
|
|
30
|
+
constValue: string;
|
|
31
|
+
variableValue: string;
|
|
32
|
+
expression: string;
|
|
33
|
+
dictCode: string;
|
|
34
|
+
primaryValue: string;
|
|
35
|
+
remark: string;
|
|
36
|
+
columnNameOptions?: QueryTableColumnForm[];
|
|
37
|
+
primaryTableName?: string;
|
|
38
|
+
primaryColumnNameGoal?: string;
|
|
39
|
+
primaryColumnNameMatch?: string[];
|
|
40
|
+
primaryValueOptions?: QueryTableColumnForm[];
|
|
41
|
+
sign?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface QueryFileTemplateForm {
|
|
44
|
+
id: string;
|
|
45
|
+
title: string;
|
|
46
|
+
useType: string;
|
|
47
|
+
fileType: string;
|
|
48
|
+
fileCode: string;
|
|
49
|
+
template: string;
|
|
50
|
+
template2?: string;
|
|
51
|
+
template3?: string;
|
|
52
|
+
template4?: string;
|
|
53
|
+
template5?: string;
|
|
54
|
+
template6?: string;
|
|
55
|
+
template7?: string;
|
|
56
|
+
template8?: string;
|
|
57
|
+
template9?: string;
|
|
58
|
+
templateRule: string;
|
|
59
|
+
enableStatus: number;
|
|
60
|
+
description: string;
|
|
61
|
+
appId: string;
|
|
62
|
+
tenantCode: string;
|
|
63
|
+
fileCodeFormat?: string[];
|
|
64
|
+
businessTypeData?: BusinessTypeData[] | string;
|
|
65
|
+
businessRuleData?: BusinessRuleData[] | string;
|
|
66
|
+
businessMetaData?: BusinessMetaData[] | string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* 分页查询
|
|
70
|
+
* @param params
|
|
71
|
+
*/
|
|
72
|
+
export declare function pageQueryFileTemplate(params: Record<string, any>): Promise< AxiosResponse<PageQueryResponse, any>>;
|
|
73
|
+
/**
|
|
74
|
+
* 条件查询
|
|
75
|
+
* @param params
|
|
76
|
+
*/
|
|
77
|
+
export declare function queryFileTemplates(params: Record<string, any>): Promise< AxiosResponse<QueryFileTemplateForm[], any>>;
|
|
78
|
+
/**
|
|
79
|
+
* 单条查询
|
|
80
|
+
* @param id
|
|
81
|
+
*/
|
|
82
|
+
export declare function getFileTemplate(id: string): Promise< AxiosResponse<QueryFileTemplateForm, any>>;
|
|
83
|
+
/**
|
|
84
|
+
* 复制一条数据
|
|
85
|
+
* @param id
|
|
86
|
+
*/
|
|
87
|
+
export declare function copyFileTemplate(id: string): Promise< AxiosResponse<QueryFileTemplateForm, any>>;
|
|
88
|
+
/**
|
|
89
|
+
* 创建或更新
|
|
90
|
+
* @param params
|
|
91
|
+
*/
|
|
92
|
+
export declare function createOrUpdateFileTemplate(params: QueryFileTemplateForm): Promise< AxiosResponse<QueryResult, any>>;
|
|
93
|
+
/**
|
|
94
|
+
* 删除
|
|
95
|
+
* @param id
|
|
96
|
+
*/
|
|
97
|
+
export declare function deleteFileTemplate(id: string): Promise< AxiosResponse<QueryResult, any>>;
|
|
98
|
+
/**
|
|
99
|
+
* 根据模型数据生成文件
|
|
100
|
+
* @param id 模板id
|
|
101
|
+
* @param type template:模板文件,meta:元数据文件
|
|
102
|
+
*/
|
|
103
|
+
export declare function generateTemplateOrMetaFile(id: string, type: string): Promise< AxiosResponse<QueryResult, any>>;
|
|
104
|
+
/**
|
|
105
|
+
* 单条查询
|
|
106
|
+
* @param id
|
|
107
|
+
*/
|
|
108
|
+
export declare function getFileTemplateIndex(id: string): Promise< AxiosResponse<QueryResult, any>>;
|
|
109
|
+
/**
|
|
110
|
+
* 根据模板id和索引获取文件base64
|
|
111
|
+
* @param id
|
|
112
|
+
* @param index
|
|
113
|
+
*/
|
|
114
|
+
export declare function getTemplateBase64(id: string, index: string): Promise< AxiosResponse<QueryResult, any>>;
|