@coding-flow/flow-pc-form 0.0.4 → 0.0.5
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/components/form/index.js +2 -0
- package/dist/components/form/view.d.ts +2 -0
- package/dist/components/table/index.js +1 -1
- package/dist/components/table/presenter.d.ts +1 -19
- package/dist/components/table/presenter.js +2 -1
- package/dist/components/table/types.d.ts +2 -0
- package/package.json +4 -4
|
@@ -7,6 +7,7 @@ const form_FlowFormView = (props)=>{
|
|
|
7
7
|
const formList = props.formList || [];
|
|
8
8
|
if (props.mergeable) return /*#__PURE__*/ jsx(FlowTable, {
|
|
9
9
|
formList: formList,
|
|
10
|
+
initData: props.initData,
|
|
10
11
|
meta: props.meta,
|
|
11
12
|
onValuesChange: props.onValuesChange,
|
|
12
13
|
review: props.review,
|
|
@@ -16,6 +17,7 @@ const form_FlowFormView = (props)=>{
|
|
|
16
17
|
if (form) return /*#__PURE__*/ jsx(FlowFormView, {
|
|
17
18
|
form: form,
|
|
18
19
|
data: props.data,
|
|
20
|
+
initData: props.initData,
|
|
19
21
|
meta: props.meta,
|
|
20
22
|
onValuesChange: props.onValuesChange,
|
|
21
23
|
review: props.review,
|
|
@@ -44,7 +44,7 @@ const FlowTable = (props)=>{
|
|
|
44
44
|
children: [
|
|
45
45
|
!currentForm && /*#__PURE__*/ jsx(Table, {
|
|
46
46
|
columns: columns,
|
|
47
|
-
dataSource: presenter.getDatasource(),
|
|
47
|
+
dataSource: presenter.getDatasource(props.initData),
|
|
48
48
|
rowKey: "recordId",
|
|
49
49
|
rowSelection: {
|
|
50
50
|
type: "checkbox",
|
|
@@ -16,23 +16,5 @@ export declare class TableFormPresenter {
|
|
|
16
16
|
hidden?: undefined;
|
|
17
17
|
})[];
|
|
18
18
|
private getFormData;
|
|
19
|
-
getDatasource():
|
|
20
|
-
createdOperatorName: string;
|
|
21
|
-
createdOperatorId: number;
|
|
22
|
-
submitOperatorName: string | undefined;
|
|
23
|
-
submitOperatorId: number | undefined;
|
|
24
|
-
recordId: number;
|
|
25
|
-
createdOperator: import("@coding-flow/flow-types").FlowOperator;
|
|
26
|
-
submitOperator?: import("@coding-flow/flow-types").FlowOperator;
|
|
27
|
-
title: string;
|
|
28
|
-
data: Record<string, any>;
|
|
29
|
-
recordState: number;
|
|
30
|
-
flowState: number;
|
|
31
|
-
createTime: number;
|
|
32
|
-
processId: string;
|
|
33
|
-
workTitle: string;
|
|
34
|
-
nodeId: string;
|
|
35
|
-
nodeName: string;
|
|
36
|
-
nodeType: string;
|
|
37
|
-
}[];
|
|
19
|
+
getDatasource(initData: any): any[];
|
|
38
20
|
}
|
|
@@ -49,7 +49,7 @@ class TableFormPresenter {
|
|
|
49
49
|
for (const field of fields)data[field.code] = formInstance.getFieldValue(field.code);
|
|
50
50
|
return data;
|
|
51
51
|
}
|
|
52
|
-
getDatasource() {
|
|
52
|
+
getDatasource(initData) {
|
|
53
53
|
const datasource = [];
|
|
54
54
|
for (const form of this.formList){
|
|
55
55
|
const data = form.data;
|
|
@@ -64,6 +64,7 @@ class TableFormPresenter {
|
|
|
64
64
|
datasource.push({
|
|
65
65
|
...this.getFormData(form),
|
|
66
66
|
...data,
|
|
67
|
+
...initData,
|
|
67
68
|
...submitOperator,
|
|
68
69
|
...createdOperator
|
|
69
70
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coding-flow/flow-pc-form",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "flow-engine pc form engine",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"@coding-form/form-engine": "^0.0.13",
|
|
37
37
|
"antd": "^6.2.1",
|
|
38
38
|
"dayjs": "^1.11.19",
|
|
39
|
-
"@coding-flow/flow-core": "0.0.
|
|
40
|
-
"@coding-flow/flow-types": "0.0.
|
|
39
|
+
"@coding-flow/flow-core": "0.0.5",
|
|
40
|
+
"@coding-flow/flow-types": "0.0.5"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@coding-flow/flow-types": "0.0.
|
|
43
|
+
"@coding-flow/flow-types": "0.0.5"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "rslib build",
|