Skip to content

Commit bd28ac2

Browse files
committed
add 3.3.27
1 parent 7133d97 commit bd28ac2

File tree

30 files changed

+450
-100
lines changed

30 files changed

+450
-100
lines changed

admin-ui/src/components/Flow/flow/data.ts

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,24 +97,36 @@ export class FlowData extends FlowWorkData {
9797
this.formParams = formParams;
9898
}
9999

100+
// 是否可以审批
100101
canHandle = () => {
101102
return this.data.canHandle;
102103
}
103104

105+
// 是否是开始节点
104106
isStartFlow = () => {
105107
if (this.data) {
106108
return this.data.flowNode.startNode;
107109
}
108110
return false;
109111
}
110112

113+
// 获取当前节点的code
114+
getNodeCode = () => {
115+
if (this.data) {
116+
return this.data.flowNode.code;
117+
}
118+
return null;
119+
}
120+
121+
// 获取当前节点的按钮
111122
getNodeButtons = () => {
112123
if (this.data) {
113124
return this.data.flowNode.buttons;
114125
}
115126
return null;
116127
}
117128

129+
// 获取当前节点的标题
118130
getCurrentNodeTitle = () => {
119131
if (this.data) {
120132
const node = this.data.flowNode;
@@ -125,6 +137,7 @@ export class FlowData extends FlowWorkData {
125137
return null;
126138
}
127139

140+
// 获取当前节点的视图 (内部使用)
128141
getFlowFormView(view: React.ComponentType<FlowFormViewProps> | FlowFormView) {
129142
if (typeof view === 'object') {
130143
const nodeView = this.data.flowNode.view;
@@ -133,7 +146,7 @@ export class FlowData extends FlowWorkData {
133146
return view;
134147
}
135148

136-
149+
// 获取当前节点是否可编辑
137150
getFlowNodeEditable = () => {
138151
if (this.data) {
139152
const node = this.data.flowNode;
@@ -144,14 +157,15 @@ export class FlowData extends FlowWorkData {
144157
return false
145158
}
146159

160+
// 获取当前节点的表单数据
147161
getFlowData = () => {
148162
return {
149163
...this.data.bindData,
150164
...this.formParams
151165
}
152166
}
153167

154-
168+
// 获取当前节点的表单数据 (内部使用)
155169
getNodeState = (code: string) => {
156170
const historyRecords = this.data.historyRecords || [];
157171

@@ -160,9 +174,9 @@ export class FlowData extends FlowWorkData {
160174
return "done";
161175
}
162176

163-
for(const record of historyRecords){
164-
if(record.nodeCode === code){
165-
if(record.flowType==='TODO'){
177+
for (const record of historyRecords) {
178+
if (record.nodeCode === code) {
179+
if (record.flowType === 'TODO') {
166180
return "wait";
167181
}
168182
return "done";
@@ -172,6 +186,7 @@ export class FlowData extends FlowWorkData {
172186
return "wait";
173187
}
174188

189+
// 获取当前节点的流程图
175190
getFlowSchema = () => {
176191

177192
if (this.data.flowWork.schema) {
@@ -186,39 +201,46 @@ export class FlowData extends FlowWorkData {
186201
return null;
187202
}
188203

204+
// 是否存在数据
189205
hasData() {
190206
return !!this.data;
191207
}
192208

209+
// 获取当前的详情的记录数据
193210
getCurrentFlowRecord = () => {
194211
return this.data.flowRecord;
195212
}
196213

214+
// 获取历史记录
197215
getHistoryRecords = () => {
198216
return this.data.historyRecords;
199217
}
200218

219+
// 是否是审批完成
201220
isDone() {
202221
if (this.data.flowRecord) {
203222
return this.data.flowRecord.flowStatus === 'FINISH' || this.data.flowRecord.flowType === 'DONE';
204223
}
205224
return false;
206225
}
207226

227+
// 是否是结束节点
208228
private isFinished() {
209229
if (this.data.flowRecord) {
210230
return this.data.flowRecord.flowStatus === 'FINISH';
211231
}
212232
return false;
213233
}
214234

235+
// 是否需要展示流转记录 (内部使用)
215236
showHistory() {
216-
if(this.isDone()){
237+
if (this.isDone()) {
217238
return true;
218239
}
219240
return !this.isStartFlow();
220241
}
221242

243+
// 是否展示审批意见 (内部使用)
222244
showOpinion() {
223245
return this.canHandle() && !this.isStartFlow();
224246
}

example/example-application/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-example</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>3.3.27.dev</version>
8+
<version>3.3.27</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

example/example-domain/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-example</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>3.3.27.dev</version>
8+
<version>3.3.27</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

example/example-infra-flow/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-example</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>3.3.27.dev</version>
8+
<version>3.3.27</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

example/example-infra-jpa/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-example</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>3.3.27.dev</version>
8+
<version>3.3.27</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

example/example-server/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-example</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>3.3.27.dev</version>
8+
<version>3.3.27</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

example/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</parent>
1818

1919
<artifactId>springboot-example</artifactId>
20-
<version>3.3.27.dev</version>
20+
<version>3.3.27</version>
2121

2222
<name>springboot-example</name>
2323
<description>springboot-example project for Spring Boot</description>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
<groupId>com.codingapi.springboot</groupId>
1717
<artifactId>springboot-parent</artifactId>
18-
<version>3.3.27.dev</version>
18+
<version>3.3.27</version>
1919

2020
<url>https://github.com/codingapi/springboot-framewrok</url>
2121
<name>springboot-parent</name>

springboot-starter-data-authorization/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.codingapi.springboot</groupId>
88
<artifactId>springboot-parent</artifactId>
9-
<version>3.3.27.dev</version>
9+
<version>3.3.27</version>
1010
</parent>
1111

1212
<artifactId>springboot-starter-data-authorization</artifactId>

springboot-starter-data-authorization/src/main/java/com/codingapi/springboot/authorization/DataAuthorizationConfiguration.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
package com.codingapi.springboot.authorization;
22

33

4+
import com.codingapi.springboot.authorization.filter.DataAuthorizationFilter;
45
import com.codingapi.springboot.authorization.handler.ColumnHandler;
56
import com.codingapi.springboot.authorization.handler.RowHandler;
67
import com.codingapi.springboot.authorization.interceptor.SQLInterceptor;
78
import com.codingapi.springboot.authorization.register.ConditionHandlerRegister;
9+
import com.codingapi.springboot.authorization.register.DataAuthorizationContextRegister;
810
import com.codingapi.springboot.authorization.register.ResultSetHandlerRegister;
911
import com.codingapi.springboot.authorization.register.SQLInterceptorRegister;
1012
import org.springframework.beans.factory.annotation.Autowired;
1113
import org.springframework.context.annotation.Bean;
1214
import org.springframework.context.annotation.Configuration;
1315

16+
import java.util.List;
17+
1418
@Configuration
1519
public class DataAuthorizationConfiguration {
1620

@@ -28,4 +32,9 @@ public ResultSetHandlerRegister resultSetHandlerRegister(@Autowired(required = f
2832
public SQLInterceptorRegister sqlInterceptorRegister(@Autowired(required = false) SQLInterceptor sqlInterceptor) {
2933
return new SQLInterceptorRegister(sqlInterceptor);
3034
}
35+
36+
@Bean
37+
public DataAuthorizationContextRegister dataAuthorizationContextRegister(@Autowired(required = false) List<DataAuthorizationFilter> dataAuthorizationFilters) {
38+
return new DataAuthorizationContextRegister(dataAuthorizationFilters);
39+
}
3140
}

0 commit comments

Comments
 (0)