Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5d91131e
authored
Jul 20, 2024
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【缺陷修复】BPM:流程重新发起时,禁用业务表单的情况,避免报错
parent
46da7e28
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
17 deletions
+23
-17
src/api/bpm/definition/index.ts
+1
-1
src/api/bpm/model/index.ts
+1
-0
src/api/bpm/processInstance/index.ts
+2
-11
src/views/bpm/processInstance/index.vue
+19
-5
No files found.
src/api/bpm/definition/index.ts
View file @
5d91131e
import
request
from
'@/config/axios'
import
request
from
'@/config/axios'
export
const
getProcessDefinition
=
async
(
id
:
number
,
key
:
string
)
=>
{
export
const
getProcessDefinition
=
async
(
id
?:
string
,
key
?
:
string
)
=>
{
return
await
request
.
get
({
return
await
request
.
get
({
url
:
'/bpm/process-definition/get'
,
url
:
'/bpm/process-definition/get'
,
params
:
{
id
,
key
}
params
:
{
id
,
key
}
...
...
src/api/bpm/model/index.ts
View file @
5d91131e
...
@@ -5,6 +5,7 @@ export type ProcessDefinitionVO = {
...
@@ -5,6 +5,7 @@ export type ProcessDefinitionVO = {
version
:
number
version
:
number
deploymentTIme
:
string
deploymentTIme
:
string
suspensionState
:
number
suspensionState
:
number
formType
?:
number
}
}
export
type
ModelVO
=
{
export
type
ModelVO
=
{
...
...
src/api/bpm/processInstance/index.ts
View file @
5d91131e
import
request
from
'@/config/axios'
import
request
from
'@/config/axios'
import
{
ProcessDefinitionVO
}
from
'@/api/bpm/model'
export
type
Task
=
{
export
type
Task
=
{
id
:
string
id
:
string
...
@@ -18,17 +19,7 @@ export type ProcessInstanceVO = {
...
@@ -18,17 +19,7 @@ export type ProcessInstanceVO = {
businessKey
:
string
businessKey
:
string
createTime
:
string
createTime
:
string
endTime
:
string
endTime
:
string
}
processDefinition
?:
ProcessDefinitionVO
export
type
ProcessInstanceCopyVO
=
{
type
:
number
taskName
:
string
taskKey
:
string
processInstanceName
:
string
processInstanceKey
:
string
startUserId
:
string
options
:
string
[]
reason
:
string
}
}
export
const
getProcessInstanceMyPage
=
async
(
params
:
any
)
=>
{
export
const
getProcessInstanceMyPage
=
async
(
params
:
any
)
=>
{
...
...
src/views/bpm/processInstance/index.vue
View file @
5d91131e
...
@@ -76,7 +76,7 @@
...
@@ -76,7 +76,7 @@
type=
"primary"
type=
"primary"
plain
plain
v-hasPermi=
"['bpm:process-instance:query']"
v-hasPermi=
"['bpm:process-instance:query']"
@
click=
"handleCreate()"
@
click=
"handleCreate(
undefined
)"
>
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
发起流程
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
发起流程
</el-button>
</el-button>
...
@@ -146,7 +146,7 @@
...
@@ -146,7 +146,7 @@
>
>
取消
取消
</el-button>
</el-button>
<el-button
link
type=
"primary"
v-else
@
click=
"handleCreate(scope.row
.id
)"
>
<el-button
link
type=
"primary"
v-else
@
click=
"handleCreate(scope.row)"
>
重新发起
重新发起
</el-button>
</el-button>
</
template
>
</
template
>
...
@@ -167,6 +167,8 @@ import { dateFormatter, formatPast2 } from '@/utils/formatTime'
...
@@ -167,6 +167,8 @@ import { dateFormatter, formatPast2 } from '@/utils/formatTime'
import
{
ElMessageBox
}
from
'element-plus'
import
{
ElMessageBox
}
from
'element-plus'
import
*
as
ProcessInstanceApi
from
'@/api/bpm/processInstance'
import
*
as
ProcessInstanceApi
from
'@/api/bpm/processInstance'
import
{
CategoryApi
}
from
'@/api/bpm/category'
import
{
CategoryApi
}
from
'@/api/bpm/category'
import
{
ProcessInstanceVO
}
from
'@/api/bpm/processInstance'
import
*
as
DefinitionApi
from
'@/api/bpm/definition'
defineOptions
({
name
:
'BpmProcessInstanceMy'
})
defineOptions
({
name
:
'BpmProcessInstanceMy'
})
...
@@ -214,10 +216,22 @@ const resetQuery = () => {
...
@@ -214,10 +216,22 @@ const resetQuery = () => {
}
}
/** 发起流程操作 **/
/** 发起流程操作 **/
const
handleCreate
=
(
id
)
=>
{
const
handleCreate
=
async
(
row
?:
ProcessInstanceVO
)
=>
{
router
.
push
({
// 如果是【业务表单】,不支持重新发起
if
(
row
?.
id
)
{
const
processDefinitionDetail
=
await
DefinitionApi
.
getProcessDefinition
(
row
.
processDefinitionId
)
debugger
if
(
processDefinitionDetail
.
formType
===
20
)
{
message
.
error
(
'重新发起流程失败,原因:该流程使用业务表单,不支持重新发起'
)
return
}
}
// 跳转发起流程界面
await
router
.
push
({
name
:
'BpmProcessInstanceCreate'
,
name
:
'BpmProcessInstanceCreate'
,
query
:
{
processInstanceId
:
id
}
query
:
{
processInstanceId
:
row
?.
id
}
})
})
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment