优化审批流没有正确子节点报错

This commit is contained in:
xiangheng
2024-05-19 13:39:55 +08:00
parent 0edc6a117e
commit 22371123e5
7 changed files with 21 additions and 10 deletions

View File

@@ -8,7 +8,7 @@
"prod": "vite build",
"preview": "vite preview --port 4173",
"build": "node ./scripts/build.mjs",
"type-check": "vue-tsc --noEmit --checkJs false --skipLibCheck",
"type-check": "vue-tsc --noEmit --checkJs true --skipLibCheck",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
},
"dependencies": {

View File

@@ -399,7 +399,7 @@ export default {
}
reqGet(data).then((res) => {
if (!res) {
tipWords.value = '网络'
tipWords.value = '网络错误'
return
}
if (res.repCode == '0000') {

View File

@@ -7,6 +7,7 @@ import request from '../utils/axios' //组件内部封装的axios
interface ResponseData {
repData: {
originalImageBase64: string
jigsawImageBase64: string
token: string
secretKey: string
wordList: Array<string>

View File

@@ -3,7 +3,7 @@ import axios from 'axios'
axios.defaults.baseURL = '/api'
const service = axios.create({
timeout: 40000,
timeout: 4000,
headers: {
'X-Requested-With': 'XMLHttpRequest',
'Content-Type': 'application/json; charset=UTF-8'

View File

@@ -149,7 +149,7 @@ func (hd FlowHistoryHandler) Pass(c *gin.Context) {
return
}
err := Service.Pass(pass)
fmt.Println(err)
response.CheckAndResp(c, err)
}

View File

@@ -523,10 +523,13 @@ func (Service flowHistoryService) GetNextNode(ApplyId int) (res []FlowTree, appl
func DeepNextNode(nextNodes []FlowTree, flowTree *[]FlowTree, formValue map[string]interface{}) []FlowTree {
for _, v := range *flowTree {
if v.Type == "bpmn:startEvent" {
// 开始节点
child := DeepNextNode(nextNodes, v.Children, formValue)
nextNodes = append(nextNodes, v)
// 开始节点
if v.Children == nil {
break
}
child := DeepNextNode(nextNodes, v.Children, formValue)
nextNodes = append(nextNodes, child...)
break
} else if v.Type == "bpmn:exclusiveGateway" {
@@ -585,16 +588,23 @@ func DeepNextNode(nextNodes []FlowTree, flowTree *[]FlowTree, formValue map[stri
if haveFalse {
continue
} else {
nextNodes = append(nextNodes, v)
if v.Children == nil {
break
}
// 判断formValue值决定是不是递归这个网关
child := DeepNextNode(nextNodes, v.Children, formValue)
nextNodes = append(nextNodes, v)
nextNodes = append(nextNodes, child...)
break
}
} else if v.Type == "bpmn:serviceTask" {
nextNodes = append(nextNodes, v)
if v.Children == nil {
break
}
// 系统服务
child := DeepNextNode(nextNodes, v.Children, formValue)
nextNodes = append(nextNodes, v)
nextNodes = append(nextNodes, child...)
} else if v.Type == "bpmn:userTask" {
//用户节点

View File

@@ -164,7 +164,7 @@ func IsFailWithResp(c *gin.Context, err error) bool {
FailWithData(c, v, data)
// 其他类型
default:
Fail(c, SystemError)
Fail(c, SystemError.Make(err.Error()))
}
return true
}