Skip to content

Commit 585a98b

Browse files
committed
remove flow
1 parent afa239d commit 585a98b

File tree

8 files changed

+72
-136
lines changed

8 files changed

+72
-136
lines changed

admin-pro-ui/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"@ant-design/icons": "^5.4.0",
88
"@ant-design/pro-components": "^2.8.2",
99
"@babel/standalone": "^7.25.6",
10-
"@codingapi/flow-pc": "^0.0.3",
10+
"@codingapi/flow-pc": "^0.0.8",
1111
"@codingapi/form-pc": "^0.0.16",
1212
"@codingapi/ui-framework": "^0.0.12",
1313
"@dnd-kit/core": "^6.2.0",

admin-pro-ui/src/components/descriptions/index.scss

-34
This file was deleted.

admin-pro-ui/src/components/descriptions/index.tsx

-99
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import * as flowApi from "@/api/flow";
2+
import {UserSelectFormViewKey} from "@codingapi/ui-framework";
3+
import {PostponedFormViewKey} from "@codingapi/ui-framework";
4+
import {ComponentBus} from "@codingapi/ui-framework";
5+
import {FlowApiContent,FlowApi} from "@codingapi/flow-pc";
6+
import UserSelectView from "@/components/flow/UserSelectView";
7+
import PostponedFormView from "@/components/flow/PostponedFormView";
8+
9+
10+
ComponentBus.getInstance().registerComponent(UserSelectFormViewKey,UserSelectView);
11+
ComponentBus.getInstance().registerComponent(PostponedFormViewKey,PostponedFormView);
12+
13+
class DefaultFlowApiImpl implements FlowApi{
14+
15+
startFlow(body: any): Promise<any> {
16+
return flowApi.startFlow(body);
17+
}
18+
19+
submitFlow(body: any): Promise<any> {
20+
return flowApi.submitFlow(body);
21+
}
22+
23+
removeFlow(body: any): Promise<any> {
24+
return flowApi.removeFlow(body);
25+
}
26+
27+
saveFlow(body: any): Promise<any> {
28+
return flowApi.saveFlow(body);
29+
}
30+
31+
postponedFlow(body: any): Promise<any> {
32+
return flowApi.postponed(body);
33+
}
34+
35+
triggerCustomFlow(body: any): Promise<any> {
36+
return flowApi.custom(body);
37+
}
38+
39+
transferFlow(body: any): Promise<any> {
40+
return flowApi.transfer(body);
41+
}
42+
43+
urgeFlow(body: any): Promise<any> {
44+
return flowApi.urge(body);
45+
}
46+
47+
recallFlow(body: any): Promise<any> {
48+
return flowApi.recall(body);
49+
}
50+
51+
trySubmitFlow(body: any): Promise<any> {
52+
return flowApi.trySubmitFlow(body);
53+
}
54+
55+
getDetailById(id: string): Promise<any> {
56+
return flowApi.detail(id,null);
57+
}
58+
59+
getDetailByWorkCode(workCode: string): Promise<any> {
60+
return flowApi.detail(null,workCode);
61+
}
62+
63+
}
64+
65+
FlowApiContent.getInstance().registerFlowApi(new DefaultFlowApiImpl());
66+
67+
console.log('register flow api');
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import "@/components/flow/register";

admin-pro-ui/src/index.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {ConfigProvider} from "antd";
88
import zhCN from 'antd/es/locale/zh_CN';
99
import {theme} from "@/config/theme";
1010
import './index.scss';
11+
import "@/config/register.component";
1112

1213
const root = ReactDOM.createRoot(
1314
document.getElementById('root') as HTMLElement

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, {useEffect} from "react";
2-
import {FlowFormViewProps} from "@/components/flow/types";
2+
import {FlowFormViewProps} from "@codingapi/ui-framework";
33
import {Form,FormInput,FormTextArea} from "@codingapi/form-pc";
44
import {ValidateUtils} from "@codingapi/ui-framework";
55

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {ActionType, PageContainer, ProTable} from "@ant-design/pro-components";
33
import {list} from "@/api/leave";
44
import {Button} from "antd";
55
import LeaveForm from "@/pages/flow/leave/LeaveForm";
6-
import FlowModelView from "@/components/flow/view/FlowModelView";
6+
import {FlowModelView} from "@codingapi/flow-pc";
77

88
const LeavePage = () => {
99

0 commit comments

Comments
 (0)