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
bcecf5c7
authored
Mar 02, 2025
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【功能优化】BPM:优化 model 历史的展示
parent
21b65324
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
46 deletions
+57
-46
src/router/modules/remaining.ts
+1
-1
src/views/bpm/model/CategoryDraggableModel.vue
+1
-1
src/views/bpm/model/definition/index.vue
+55
-44
No files found.
src/router/modules/remaining.ts
View file @
bcecf5c7
...
@@ -280,7 +280,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
...
@@ -280,7 +280,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
},
},
{
{
path
:
'manager/definition'
,
path
:
'manager/definition'
,
component
:
()
=>
import
(
'@/views/bpm/definition/index.vue'
),
component
:
()
=>
import
(
'@/views/bpm/
model/
definition/index.vue'
),
name
:
'BpmProcessDefinition'
,
name
:
'BpmProcessDefinition'
,
meta
:
{
meta
:
{
noCache
:
true
,
noCache
:
true
,
...
...
src/views/bpm/model/CategoryDraggableModel.vue
View file @
bcecf5c7
...
@@ -113,7 +113,7 @@
...
@@ -113,7 +113,7 @@
</el-text>
</el-text>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"流程类型"
prop=
"
modelT
ype"
min-width=
"120"
>
<el-table-column
label=
"流程类型"
prop=
"
t
ype"
min-width=
"120"
>
<
template
#
default=
"{ row }"
>
<
template
#
default=
"{ row }"
>
<dict-tag
:value=
"row.type"
:type=
"DICT_TYPE.BPM_MODEL_TYPE"
/>
<dict-tag
:value=
"row.type"
:type=
"DICT_TYPE.BPM_MODEL_TYPE"
/>
</
template
>
</
template
>
...
...
src/views/bpm/definition/index.vue
→
src/views/bpm/
model/
definition/index.vue
View file @
bcecf5c7
...
@@ -3,40 +3,60 @@
...
@@ -3,40 +3,60 @@
<ContentWrap>
<ContentWrap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"定义编号"
align=
"center"
prop=
"id"
width=
"400"
/>
<el-table-column
label=
"定义编号"
align=
"center"
prop=
"id"
min-width=
"250"
/>
<el-table-column
label=
"流程名称"
align=
"center"
prop=
"name"
width=
"200"
>
<el-table-column
label=
"流程名称"
align=
"center"
prop=
"name"
min-width=
"150"
/>
<template
#
default=
"scope"
>
<el-table-column
label=
"流程图标"
align=
"center"
min-width=
"50"
>
<el-button
type=
"primary"
link
@
click=
"handleBpmnDetail(scope.row)"
>
<template
#
default=
"
{ row }">
<span>
{{
scope
.
row
.
name
}}
</span>
<el-image
v-if=
"row.icon"
:src=
"row.icon"
class=
"h-24px w-24pxrounded"
/>
</el-button>
</
template
>
</el-table-column>
<el-table-column
label=
"可见范围"
prop=
"startUserIds"
min-width=
"100"
>
<
template
#
default=
"{ row }"
>
<el-text
v-if=
"!row.startUsers?.length"
>
全部可见
</el-text>
<el-text
v-else-if=
"row.startUsers.length === 1"
>
{{
row
.
startUsers
[
0
].
nickname
}}
</el-text>
<el-text
v-else
>
<el-tooltip
class=
"box-item"
effect=
"dark"
placement=
"top"
:content=
"row.startUsers.map((user: any) => user.nickname).join('、')"
>
{{
row
.
startUsers
[
0
].
nickname
}}
等
{{
row
.
startUsers
.
length
}}
人可见
</el-tooltip>
</el-text>
</
template
>
</el-table-column>
<el-table-column
label=
"流程类型"
prop=
"modelType"
min-width=
"120"
>
<
template
#
default=
"{ row }"
>
<dict-tag
:value=
"row.modelType"
:type=
"DICT_TYPE.BPM_MODEL_TYPE"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"定义分类"
align=
"center"
prop=
"categoryName"
width=
"100"
/>
<el-table-column
label=
"表单信息"
prop=
"formType"
min-width=
"150"
>
<el-table-column
label=
"表单信息"
align=
"center"
prop=
"formType"
width=
"200"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
<el-button
v-if=
"scope.row.formType ===
10
"
v-if=
"scope.row.formType ===
BpmModelFormType.NORMAL
"
type=
"primary"
type=
"primary"
link
link
@
click=
"handleFormDetail(scope.row)"
@
click=
"handleFormDetail(scope.row)"
>
>
<span>
{{
scope
.
row
.
formName
}}
</span>
<span>
{{
scope
.
row
.
formName
}}
</span>
</el-button>
</el-button>
<el-button
v-else
type=
"primary"
link
@
click=
"handleFormDetail(scope.row)"
>
<el-button
v-else-if=
"scope.row.formType === BpmModelFormType.CUSTOM"
type=
"primary"
link
@
click=
"handleFormDetail(scope.row)"
>
<span>
{{
scope
.
row
.
formCustomCreatePath
}}
</span>
<span>
{{
scope
.
row
.
formCustomCreatePath
}}
</span>
</el-button>
</el-button>
<label
v-else
>
暂无表单
</label>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"流程版本"
align=
"center"
prop=
"processDefinition.version"
width=
"80"
>
<el-table-column
label=
"流程版本"
align=
"center"
min-
width=
"80"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-tag
v-if=
"scope.row"
>
v
{{
scope
.
row
.
version
}}
</el-tag>
<el-tag>
v
{{
scope
.
row
.
version
}}
</el-tag>
<el-tag
type=
"warning"
v-else
>
未部署
</el-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"状态"
align=
"center"
prop=
"version"
width=
"80"
>
<
template
#
default=
"scope"
>
<el-tag
type=
"success"
v-if=
"scope.row.suspensionState === 1"
>
激活
</el-tag>
<el-tag
type=
"warning"
v-if=
"scope.row.suspensionState === 2"
>
挂起
</el-tag>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
...
@@ -46,13 +66,6 @@
...
@@ -46,13 +66,6 @@
width=
"180"
width=
"180"
:formatter=
"dateFormatter"
:formatter=
"dateFormatter"
/>
/>
<el-table-column
label=
"定义描述"
align=
"center"
prop=
"description"
width=
"300"
show-overflow-tooltip
/>
</el-table>
</el-table>
<!-- 分页 -->
<!-- 分页 -->
<Pagination
<Pagination
...
@@ -67,18 +80,14 @@
...
@@ -67,18 +80,14 @@
<Dialog
title=
"表单详情"
v-model=
"formDetailVisible"
width=
"800"
>
<Dialog
title=
"表单详情"
v-model=
"formDetailVisible"
width=
"800"
>
<form-create
:rule=
"formDetailPreview.rule"
:option=
"formDetailPreview.option"
/>
<form-create
:rule=
"formDetailPreview.rule"
:option=
"formDetailPreview.option"
/>
</Dialog>
</Dialog>
<!-- 弹窗:流程模型图的预览 -->
<Dialog
title=
"流程图"
v-model=
"bpmnDetailVisible"
width=
"800"
>
<MyProcessViewer
style=
"height: 700px"
key=
"designer"
:xml=
"bpmnXml"
/>
</Dialog>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
{
MyProcessViewer
}
from
'@/components/bpmnProcessDesigner/package'
import
*
as
DefinitionApi
from
'@/api/bpm/definition'
import
*
as
DefinitionApi
from
'@/api/bpm/definition'
import
{
setConfAndFields2
}
from
'@/utils/formCreate'
import
{
setConfAndFields2
}
from
'@/utils/formCreate'
import
{
DICT_TYPE
}
from
'@/utils/dict'
import
{
BpmModelFormType
}
from
'@/utils/constants'
defineOptions
({
name
:
'BpmProcessDefinition'
})
defineOptions
({
name
:
'BpmProcessDefinition'
})
...
@@ -113,7 +122,7 @@ const formDetailPreview = ref({
...
@@ -113,7 +122,7 @@ const formDetailPreview = ref({
option
:
{}
option
:
{}
})
})
const
handleFormDetail
=
async
(
row
:
any
)
=>
{
const
handleFormDetail
=
async
(
row
:
any
)
=>
{
if
(
row
.
formType
==
10
)
{
if
(
row
.
formType
==
BpmModelFormType
.
NORMAL
)
{
// 设置表单
// 设置表单
setConfAndFields2
(
formDetailPreview
,
row
.
formConf
,
row
.
formFields
)
setConfAndFields2
(
formDetailPreview
,
row
.
formConf
,
row
.
formFields
)
// 弹窗打开
// 弹窗打开
...
@@ -125,19 +134,21 @@ const handleFormDetail = async (row: any) => {
...
@@ -125,19 +134,21 @@ const handleFormDetail = async (row: any) => {
}
}
}
}
/** 流程图的详情按钮操作 */
const
bpmnDetailVisible
=
ref
(
false
)
const
bpmnXml
=
ref
(
''
)
const
handleBpmnDetail
=
async
(
row
:
any
)
=>
{
// 设置可见
bpmnXml
.
value
=
''
bpmnDetailVisible
.
value
=
true
// 加载 BPMN XML
bpmnXml
.
value
=
(
await
DefinitionApi
.
getProcessDefinition
(
row
.
id
))?.
bpmnXml
}
/** 初始化 **/
/** 初始化 **/
onMounted
(()
=>
{
onMounted
(()
=>
{
getList
()
getList
()
})
})
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
.flow-icon
{
display
:
flex
;
width
:
38px
;
height
:
38px
;
margin-right
:
10px
;
background-color
:
var
(
--el-color-primary
);
border-radius
:
0.25rem
;
align-items
:
center
;
justify-content
:
center
;
}
</
style
>
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