@ibiz-template/runtime 0.7.41-alpha.5 → 0.7.41-alpha.6
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/index.esm.js +198 -65
- package/dist/index.system.min.js +1 -1
- package/out/controller/control/chart/generator/base-series-generator.d.ts +12 -5
- package/out/controller/control/chart/generator/base-series-generator.d.ts.map +1 -1
- package/out/controller/control/chart/generator/base-series-generator.js +55 -24
- package/out/controller/control/form/form-detail/form-druipart/form-druipart.controller.d.ts +18 -6
- package/out/controller/control/form/form-detail/form-druipart/form-druipart.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-druipart/form-druipart.controller.js +57 -25
- package/out/controller/utils/util/util.d.ts +15 -0
- package/out/controller/utils/util/util.d.ts.map +1 -1
- package/out/controller/utils/util/util.js +57 -5
- package/out/engine/md-view.engine.d.ts +1 -1
- package/out/engine/md-view.engine.d.ts.map +1 -1
- package/out/engine/md-view.engine.js +13 -1
- package/out/interface/api/controller/control/i-api-chart.controller.d.ts +1 -0
- package/out/interface/api/controller/control/i-api-chart.controller.d.ts.map +1 -1
- package/out/interface/api/util/i-api-file-util.d.ts +65 -4
- package/out/interface/api/util/i-api-file-util.d.ts.map +1 -1
- package/out/interface/controller/event/argument/data-change.event.d.ts +4 -5
- package/out/interface/controller/event/argument/data-change.event.d.ts.map +1 -1
- package/out/service/vo/code-list-data-item/code-list-data-item.d.ts.map +1 -1
- package/out/service/vo/code-list-data-item/code-list-data-item.js +8 -1
- package/out/utils/file-util/file-util.d.ts +20 -3
- package/out/utils/file-util/file-util.d.ts.map +1 -1
- package/out/utils/file-util/file-util.js +43 -12
- package/package.json +2 -2
|
@@ -118,7 +118,9 @@ export class CodeListDataItem {
|
|
|
118
118
|
// 数据属性
|
|
119
119
|
if (dataAppDEFieldId && this.$origin[dataAppDEFieldId]) {
|
|
120
120
|
try {
|
|
121
|
-
this.data = ScriptFactory.execSingleLine(dataAppDEFieldId, this.$origin
|
|
121
|
+
this.data = ScriptFactory.execSingleLine(dataAppDEFieldId, this.$origin instanceof AppDataEntity
|
|
122
|
+
? clone(this.$origin._data)
|
|
123
|
+
: clone(this.$origin));
|
|
122
124
|
}
|
|
123
125
|
catch (error) {
|
|
124
126
|
ibiz.log.error(ibiz.i18n.t('runtime.service.dynamicCodeTable'));
|
|
@@ -170,6 +172,11 @@ export class CodeListDataItem {
|
|
|
170
172
|
enumerable: true,
|
|
171
173
|
configurable: true,
|
|
172
174
|
});
|
|
175
|
+
// 其它未处理字段
|
|
176
|
+
this.children = undefined;
|
|
177
|
+
this.cls = undefined;
|
|
178
|
+
this.tooltip = undefined;
|
|
179
|
+
this.userData = undefined;
|
|
173
180
|
// 关联其它属性,用于使用实体属性也要取到值的场景。
|
|
174
181
|
Object.keys(data instanceof AppDataEntity ? clone(data._data) : clone(data)).forEach(key => {
|
|
175
182
|
if (!Object.prototype.hasOwnProperty.call(this, key))
|
|
@@ -7,6 +7,25 @@ import { IApiFileUtil } from '../../interface';
|
|
|
7
7
|
* @implements {IApiFileUtil}
|
|
8
8
|
*/
|
|
9
9
|
export declare class FileUtil implements IApiFileUtil {
|
|
10
|
+
/**
|
|
11
|
+
* @description 自定义文件上传请求头数据
|
|
12
|
+
* @protected
|
|
13
|
+
* @type {Record<string, string>}
|
|
14
|
+
* @memberof FileUtil
|
|
15
|
+
*/
|
|
16
|
+
protected customUploadHeaders: Record<string, string>;
|
|
17
|
+
/**
|
|
18
|
+
* @description 设置文件上传请求头数据
|
|
19
|
+
* @param {Record<string, string>} args
|
|
20
|
+
* @memberof FileUtil
|
|
21
|
+
*/
|
|
22
|
+
setUploadHeaders(args: Record<string, string>): void;
|
|
23
|
+
/**
|
|
24
|
+
* @description 获取文件上传请求头数据
|
|
25
|
+
* @returns {*} {Record<string, string>}
|
|
26
|
+
* @memberof IApiFileUtil
|
|
27
|
+
*/
|
|
28
|
+
getUploadHeaders(): Record<string, string>;
|
|
10
29
|
/**
|
|
11
30
|
* @description 计算OSSCat参数
|
|
12
31
|
* @protected
|
|
@@ -18,9 +37,7 @@ export declare class FileUtil implements IApiFileUtil {
|
|
|
18
37
|
*/
|
|
19
38
|
protected calcOSSCatUrl(url: string, context: IContext, OSSCatName?: string): string;
|
|
20
39
|
/**
|
|
21
|
-
* @description
|
|
22
|
-
* 下载路径文件id用%fileId%占位,替换即可
|
|
23
|
-
* 配置编辑器参数uploadParams和exportParams时,会像导航参数一样动态添加对应的参数到url上
|
|
40
|
+
* @description 计算文件的上传路径和下载路径,下载路径文件id用%fileId%占位,替换即可;配置编辑器参数uploadParams和exportParams时,会像导航参数一样动态添加对应的参数到url上
|
|
24
41
|
* @param {IContext} context
|
|
25
42
|
* @param {IParams} params
|
|
26
43
|
* @param {IData} [data={}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-util.d.ts","sourceRoot":"","sources":["../../../src/utils/file-util/file-util.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"file-util.d.ts","sourceRoot":"","sources":["../../../src/utils/file-util/file-util.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,aAAa,EAId,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C;;;;;GAKG;AACH,qBAAa,QAAS,YAAW,YAAY;IAC3C;;;;;OAKG;IACH,SAAS,CAAC,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM;IAE3D;;;;OAIG;IACH,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI;IAIpD;;;;OAIG;IACH,gBAAgB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAqB1C;;;;;;;;OAQG;IACH,SAAS,CAAC,aAAa,CACrB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,QAAQ,EACjB,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM;IAWT;;;;;;;;;;;OAWG;IACH,iBAAiB,CACf,OAAO,EAAE,QAAQ,EACjB,MAAM,EAAE,OAAO,EACf,IAAI,GAAE,KAAU,EAChB,WAAW,GAAE,KAAU,GACtB;QACD,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;KACrB;IA0BD;;;;;;OAMG;IACG,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAuB7D;;;;;;;OAOG;IACG,UAAU,CACd,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,KAAK,GACb,OAAO,CAAC,KAAK,CAAC;IAiBjB;;;;;OAKG;IACH,WAAW,CAAC,QAAQ,EAAE,aAAa,CAAC,KAAK,CAAC,GAAG,MAAM;IAmBnD;;;;;;;;OAQG;IACG,mBAAmB,CACvB,OAAO,EAAE,QAAQ,EACjB,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,KAAK,EACX,MAAM,GAAE,KAAU,GACjB,OAAO,CAAC,KAAK,EAAE,CAAC;IA8BnB;;;;;;OAMG;IACH,UAAU,CACR,MAAM,GAAE,MAAW,EACnB,QAAQ,GAAE,OAAe,GACxB,OAAO,CAAC,QAAQ,CAAC;CAuBrB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
1
2
|
import { CoreConst, RuntimeError, downloadFileFromBlob, getAppCookie, } from '@ibiz-template/core';
|
|
2
3
|
import qs from 'qs';
|
|
3
4
|
import { convertNavData } from '../nav-params/nav-params';
|
|
@@ -8,6 +9,44 @@ import { convertNavData } from '../nav-params/nav-params';
|
|
|
8
9
|
* @implements {IApiFileUtil}
|
|
9
10
|
*/
|
|
10
11
|
export class FileUtil {
|
|
12
|
+
constructor() {
|
|
13
|
+
/**
|
|
14
|
+
* @description 自定义文件上传请求头数据
|
|
15
|
+
* @protected
|
|
16
|
+
* @type {Record<string, string>}
|
|
17
|
+
* @memberof FileUtil
|
|
18
|
+
*/
|
|
19
|
+
this.customUploadHeaders = {};
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @description 设置文件上传请求头数据
|
|
23
|
+
* @param {Record<string, string>} args
|
|
24
|
+
* @memberof FileUtil
|
|
25
|
+
*/
|
|
26
|
+
setUploadHeaders(args) {
|
|
27
|
+
Object.assign(this.customUploadHeaders, args);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @description 获取文件上传请求头数据
|
|
31
|
+
* @returns {*} {Record<string, string>}
|
|
32
|
+
* @memberof IApiFileUtil
|
|
33
|
+
*/
|
|
34
|
+
getUploadHeaders() {
|
|
35
|
+
const uploadHeaders = {};
|
|
36
|
+
// 预定义请求头数据
|
|
37
|
+
const token = getAppCookie(CoreConst.TOKEN);
|
|
38
|
+
if (token) {
|
|
39
|
+
Object.assign(uploadHeaders, {
|
|
40
|
+
[`${ibiz.env.tokenHeader}Authorization`]: `${ibiz.env.tokenPrefix}Bearer ${token}`,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
// 自定义请求头数据
|
|
44
|
+
if (this.customUploadHeaders &&
|
|
45
|
+
Object.keys(this.customUploadHeaders).length > 0) {
|
|
46
|
+
Object.assign(uploadHeaders, Object.assign({}, this.customUploadHeaders));
|
|
47
|
+
}
|
|
48
|
+
return uploadHeaders;
|
|
49
|
+
}
|
|
11
50
|
/**
|
|
12
51
|
* @description 计算OSSCat参数
|
|
13
52
|
* @protected
|
|
@@ -28,9 +67,7 @@ export class FileUtil {
|
|
|
28
67
|
return uploadUrl;
|
|
29
68
|
}
|
|
30
69
|
/**
|
|
31
|
-
* @description
|
|
32
|
-
* 下载路径文件id用%fileId%占位,替换即可
|
|
33
|
-
* 配置编辑器参数uploadParams和exportParams时,会像导航参数一样动态添加对应的参数到url上
|
|
70
|
+
* @description 计算文件的上传路径和下载路径,下载路径文件id用%fileId%占位,替换即可;配置编辑器参数uploadParams和exportParams时,会像导航参数一样动态添加对应的参数到url上
|
|
34
71
|
* @param {IContext} context
|
|
35
72
|
* @param {IParams} params
|
|
36
73
|
* @param {IData} [data={}]
|
|
@@ -144,17 +181,11 @@ export class FileUtil {
|
|
|
144
181
|
* @memberof FileUtil
|
|
145
182
|
*/
|
|
146
183
|
async chooseFileAndUpload(context, params, data, option = {}) {
|
|
147
|
-
const { accept, multiple, showUploadManager } = option;
|
|
148
|
-
const urls = ibiz.util.file.calcFileUpDownUrl(context, params, data);
|
|
184
|
+
const { accept, multiple, showUploadManager, extraParams } = option;
|
|
185
|
+
const urls = ibiz.util.file.calcFileUpDownUrl(context, params, data, extraParams);
|
|
149
186
|
const files = await ibiz.util.file.chooseFile(accept, multiple);
|
|
150
187
|
let promises = [];
|
|
151
|
-
const headers =
|
|
152
|
-
const token = getAppCookie(CoreConst.TOKEN);
|
|
153
|
-
if (token) {
|
|
154
|
-
Object.assign(headers, {
|
|
155
|
-
[`${ibiz.env.tokenHeader}Authorization`]: `${ibiz.env.tokenPrefix}Bearer ${token}`,
|
|
156
|
-
});
|
|
157
|
-
}
|
|
188
|
+
const headers = this.getUploadHeaders();
|
|
158
189
|
if (showUploadManager) {
|
|
159
190
|
promises = await ibiz.notification.uploadManager({
|
|
160
191
|
uploadUrl: urls.uploadUrl,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/runtime",
|
|
3
|
-
"version": "0.7.41-alpha.
|
|
3
|
+
"version": "0.7.41-alpha.6",
|
|
4
4
|
"description": "运行时逻辑库",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "out/index.js",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"qx-util": "^0.4.8",
|
|
69
69
|
"ramda": "^0.29.0"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "3dc00c15d9f7721680f275880724f0a823385faf"
|
|
72
72
|
}
|