mirror of
https://gitee.com/xiangheng/x_admin.git
synced 2025-10-13 03:43:50 +08:00
优化审批流没有正确子节点报错
This commit is contained in:
@@ -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": {
|
||||
|
@@ -399,7 +399,7 @@ export default {
|
||||
}
|
||||
reqGet(data).then((res) => {
|
||||
if (!res) {
|
||||
tipWords.value = '无网络'
|
||||
tipWords.value = '网络错误'
|
||||
return
|
||||
}
|
||||
if (res.repCode == '0000') {
|
||||
|
@@ -7,6 +7,7 @@ import request from '../utils/axios' //组件内部封装的axios
|
||||
interface ResponseData {
|
||||
repData: {
|
||||
originalImageBase64: string
|
||||
jigsawImageBase64: string
|
||||
token: string
|
||||
secretKey: string
|
||||
wordList: Array<string>
|
||||
|
@@ -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'
|
||||
|
@@ -149,7 +149,7 @@ func (hd FlowHistoryHandler) Pass(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
err := Service.Pass(pass)
|
||||
fmt.Println(err)
|
||||
|
||||
response.CheckAndResp(c, err)
|
||||
}
|
||||
|
||||
|
@@ -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" {
|
||||
//用户节点
|
||||
|
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user