Skip to content

Commit a68cd4f

Browse files
committed
add flow
1 parent 77bcd54 commit a68cd4f

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

admin-pro-ui/src/components/flow/components/FlowFormOpinion.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const FlowFormOpinion = ()=>{
1616
<>
1717
<Form
1818
form={opinionInstance}
19+
layout={"vertical"}
1920
loadFields={async ()=>{
2021
return [
2122
{

admin-pro-ui/src/components/flow/domain/FlowEventContext.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export class FlowEventContext {
3131
}
3232

3333
private getRequestBody = () => {
34-
const formData = this.opinionInstance.getFieldsValue();
34+
const formData = this.flowInstance.getFieldsValue();
3535
const flowData = this.flowRecordContext.getFlowFormParams();
3636
const workCode = this.flowRecordContext.getWorkCode();
3737
const recordId = this.flowStateContext.getRecordId();

admin-pro-ui/src/components/flow/view/index.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ $flow-footer-height: 80px;
2929
}
3030

3131
.flow-img {
32-
32+
width: 30vw;
3333
}
3434
}
3535

admin-pro-ui/src/pages/flow/leave/LeaveForm.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const LeaveForm: React.FC<FlowFormViewProps> = (props) => {
99

1010
useEffect(() => {
1111
if (props.dataVersion && props.data) {
12+
console.log('data',props.data);
1213
props.form?.setFieldsValue({
1314
...props.data
1415
});
@@ -18,6 +19,7 @@ const LeaveForm: React.FC<FlowFormViewProps> = (props) => {
1819
return (
1920
<Form
2021
form={props.form}
22+
layout={"vertical"}
2123
>
2224

2325
<FormInput

admin-pro-ui/src/pages/flow/leave/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const LeavePage = () => {
5959
view={LeaveForm}
6060
workCode={"leave"}
6161
formParams={{
62-
clazzName: 'com.codingapi.example.domain.Leave',
62+
clazzName: 'com.codingapi.example.infra.flow.form.LeaveForm',
6363
username: username
6464
}}
6565
/>

mobile-ui/src/components/flow/domain/FlowEventContext.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import React from "react";
2-
import {FormAction} from "@/components/form";
31
import {FlowRecordContext} from "@/components/flow/domain/FlowRecordContext";
42
import {FlowStateContext} from "@/components/flow/domain/FlowStateContext";
53
import * as flowApi from "@/api/flow";
@@ -33,7 +31,7 @@ export class FlowEventContext {
3331
}
3432

3533
private getRequestBody = () => {
36-
const formData = this.opinionInstance.getFieldsValue();
34+
const formData = this.flowInstance.getFieldsValue();
3735
const flowData = this.flowRecordContext.getFlowFormParams();
3836
const workCode = this.flowRecordContext.getWorkCode();
3937
const recordId = this.flowStateContext.getRecordId();

0 commit comments

Comments
 (0)