ztxkutils 2.3.4 → 2.3.7
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/constants.d.ts +36 -0
- package/dist/constants.js +39 -2
- package/dist/hooks/useTableValidate.d.ts +2 -2
- package/dist/hooks.js +3 -3
- package/package.json +1 -1
package/dist/constants.d.ts
CHANGED
@@ -4,3 +4,39 @@
|
|
4
4
|
*/
|
5
5
|
export declare const clientType = 1;
|
6
6
|
export declare const microPortalRoute = "/portal";
|
7
|
+
/**
|
8
|
+
* @description 是否隐藏业务系统框架结构key值
|
9
|
+
*/
|
10
|
+
export declare const WORKFLOW_HIDEFRAME_KEY = "hideFrame";
|
11
|
+
/**
|
12
|
+
* @description 通过地址栏传递token信息key值
|
13
|
+
*/
|
14
|
+
export declare const WORKFLOW_TOKEN = "token";
|
15
|
+
/**
|
16
|
+
* @description 通过地址栏传递表单是否可以修改,用于在流程中心发起审批的时候用
|
17
|
+
*/
|
18
|
+
export declare const WORKFLOW_EDIT = "toEdit";
|
19
|
+
/**
|
20
|
+
* @description 父级通知获取子级表单高度
|
21
|
+
*/
|
22
|
+
export declare const WORKFLOW_GET_HEIGHT = "getHeight";
|
23
|
+
/**
|
24
|
+
* @description 子级发送表单高度给父级
|
25
|
+
*/
|
26
|
+
export declare const WORKFLOW_RETURN_HEIGHT = "returnHeight";
|
27
|
+
/**
|
28
|
+
* @description 父级通知子级保存数据
|
29
|
+
*/
|
30
|
+
export declare const WORKFLOW_SAVE_HANDLE = "submitBizForm";
|
31
|
+
/**
|
32
|
+
* @description 子级传递保存数据成功后,传递某些数据给父级
|
33
|
+
*/
|
34
|
+
export declare const WORKFLOW_TRANSMIT_HANDLE = "returnRelevantDatas";
|
35
|
+
/**
|
36
|
+
* @description 父级通知子级保存,流程实例数据
|
37
|
+
*/
|
38
|
+
export declare const WORKFLOW_SAVE_INSTID = "saveWorkfLow";
|
39
|
+
/**
|
40
|
+
* @description 流程中心审批过程中,在某些节点可能会修改某些相关数据
|
41
|
+
*/
|
42
|
+
export declare const WORKFLOW_REVIEW = "inreview";
|
package/dist/constants.js
CHANGED
@@ -5,6 +5,43 @@
|
|
5
5
|
// web端客户端类型
|
6
6
|
var clientType = 1;
|
7
7
|
// 微前端入口路由
|
8
|
-
var microPortalRoute = '/portal';
|
8
|
+
var microPortalRoute = '/portal';
|
9
|
+
// 流程中心相关常量
|
10
|
+
/**
|
11
|
+
* @description 是否隐藏业务系统框架结构key值
|
12
|
+
*/
|
13
|
+
var WORKFLOW_HIDEFRAME_KEY = 'hideFrame';
|
14
|
+
/**
|
15
|
+
* @description 通过地址栏传递token信息key值
|
16
|
+
*/
|
17
|
+
var WORKFLOW_TOKEN = 'token';
|
18
|
+
/**
|
19
|
+
* @description 通过地址栏传递表单是否可以修改,用于在流程中心发起审批的时候用
|
20
|
+
*/
|
21
|
+
var WORKFLOW_EDIT = 'toEdit';
|
22
|
+
/**
|
23
|
+
* @description 父级通知获取子级表单高度
|
24
|
+
*/
|
25
|
+
var WORKFLOW_GET_HEIGHT = 'getHeight';
|
26
|
+
/**
|
27
|
+
* @description 子级发送表单高度给父级
|
28
|
+
*/
|
29
|
+
var WORKFLOW_RETURN_HEIGHT = 'returnHeight';
|
30
|
+
/**
|
31
|
+
* @description 父级通知子级保存数据
|
32
|
+
*/
|
33
|
+
var WORKFLOW_SAVE_HANDLE = 'submitBizForm';
|
34
|
+
/**
|
35
|
+
* @description 子级传递保存数据成功后,传递某些数据给父级
|
36
|
+
*/
|
37
|
+
var WORKFLOW_TRANSMIT_HANDLE = 'returnRelevantDatas';
|
38
|
+
/**
|
39
|
+
* @description 父级通知子级保存,流程实例数据
|
40
|
+
*/
|
41
|
+
var WORKFLOW_SAVE_INSTID = 'saveWorkfLow';
|
42
|
+
/**
|
43
|
+
* @description 流程中心审批过程中,在某些节点可能会修改某些相关数据
|
44
|
+
*/
|
45
|
+
var WORKFLOW_REVIEW = 'inreview';
|
9
46
|
|
10
|
-
export { clientType, microPortalRoute };
|
47
|
+
export { WORKFLOW_EDIT, WORKFLOW_GET_HEIGHT, WORKFLOW_HIDEFRAME_KEY, WORKFLOW_RETURN_HEIGHT, WORKFLOW_REVIEW, WORKFLOW_SAVE_HANDLE, WORKFLOW_SAVE_INSTID, WORKFLOW_TOKEN, WORKFLOW_TRANSMIT_HANDLE, clientType, microPortalRoute };
|
@@ -4,7 +4,7 @@
|
|
4
4
|
* index 当前第几行
|
5
5
|
* title 当前列标题
|
6
6
|
*/
|
7
|
-
declare type validateFn = (value: any, record: any, index: number, title: string) => any;
|
7
|
+
declare type validateFn = (value: any, record: any, index: number, title: string, expandProps?: any) => any;
|
8
8
|
interface IColumns {
|
9
9
|
dataIndex: string;
|
10
10
|
title: string;
|
@@ -18,7 +18,7 @@ interface IColumns {
|
|
18
18
|
/**
|
19
19
|
* @description 表格验证相关操作
|
20
20
|
*/
|
21
|
-
declare function useTableValidate(records: any, columns: IColumns[], tableName?: string): {
|
21
|
+
declare function useTableValidate(records: any, columns: IColumns[], tableName?: string, expandProps?: any): {
|
22
22
|
tableValidate: () => Promise<void>;
|
23
23
|
};
|
24
24
|
export default useTableValidate;
|
package/dist/hooks.js
CHANGED
@@ -79,7 +79,7 @@ function useFetchState(props) {
|
|
79
79
|
/**
|
80
80
|
* @description 表格验证相关操作
|
81
81
|
*/
|
82
|
-
function useTableValidate(records, columns, tableName) {
|
82
|
+
function useTableValidate(records, columns, tableName, expandProps) {
|
83
83
|
var _this = this;
|
84
84
|
var tableValidate = useCallback(function () { return __awaiter(_this, void 0, void 0, function () {
|
85
85
|
var requiredFileds, i, item, j, _a, key, title, validate, value;
|
@@ -118,7 +118,7 @@ function useTableValidate(records, columns, tableName) {
|
|
118
118
|
value = item[key];
|
119
119
|
if (!validate) return [3 /*break*/, 7];
|
120
120
|
if (!(typeof validate === 'function')) return [3 /*break*/, 4];
|
121
|
-
return [4 /*yield*/, validate(value, item, i + 1, title)];
|
121
|
+
return [4 /*yield*/, validate(value, item, i + 1, title, expandProps)];
|
122
122
|
case 3:
|
123
123
|
_c.sent();
|
124
124
|
return [3 /*break*/, 6];
|
@@ -154,7 +154,7 @@ function useTableValidate(records, columns, tableName) {
|
|
154
154
|
case 11: return [2 /*return*/];
|
155
155
|
}
|
156
156
|
});
|
157
|
-
}); }, [records, columns]);
|
157
|
+
}); }, [records, columns, expandProps]);
|
158
158
|
return {
|
159
159
|
tableValidate: tableValidate,
|
160
160
|
};
|