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
Unverified
Commit
ab83cee5
authored
Jan 24, 2025
by
芋道源码
Committed by
Gitee
Jan 24, 2025
Browse files
Options
Browse Files
Download
Plain Diff
!681 feat: BPM-更多设置-摘要设置
Merge pull request !681 from Lesan/feature/bpm-摘要设置
parents
99a44e8c
9e26e902
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
108 additions
and
30 deletions
+108
-30
src/views/bpm/model/form/ExtraSettings.vue
+68
-21
src/views/bpm/model/form/index.vue
+5
-1
src/views/bpm/processInstance/index.vue
+9
-0
src/views/bpm/task/done/index.vue
+14
-5
src/views/bpm/task/todo/index.vue
+12
-3
No files found.
src/views/bpm/model/form/ExtraSettings.vue
View file @
ab83cee5
...
@@ -75,12 +75,12 @@
...
@@ -75,12 +75,12 @@
</el-radio-group>
</el-radio-group>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
v-if=
"modelData.
customT
itleSetting"
class=
"mb-20px"
>
<el-form-item
v-if=
"modelData.
t
itleSetting"
class=
"mb-20px"
>
<
template
#
label
>
<
template
#
label
>
<el-text
size=
"large"
tag=
"b"
>
标题设置
</el-text>
<el-text
size=
"large"
tag=
"b"
>
标题设置
</el-text>
</
template
>
</
template
>
<div
class=
"flex flex-col"
>
<div
class=
"flex flex-col"
>
<el-radio-group
v-model=
"modelData.
customT
itleSetting.enable"
>
<el-radio-group
v-model=
"modelData.
t
itleSetting.enable"
>
<div
class=
"flex flex-col"
>
<div
class=
"flex flex-col"
>
<el-radio
:value=
"false"
<el-radio
:value=
"false"
>
系统默认
<el-text
type=
"info"
>
展示流程名称
</el-text></el-radio
>
系统默认
<el-text
type=
"info"
>
展示流程名称
</el-text></el-radio
...
@@ -96,18 +96,50 @@
...
@@ -96,18 +96,50 @@
</div>
</div>
</el-radio-group>
</el-radio-group>
<el-mention
<el-mention
v-if=
"modelData.
customT
itleSetting.enable"
v-if=
"modelData.
t
itleSetting.enable"
v-model=
"modelData.
customT
itleSetting.title"
v-model=
"modelData.
t
itleSetting.title"
type=
"textarea"
type=
"textarea"
prefix=
"{"
prefix=
"{"
split=
"}"
split=
"}"
whole
whole
:options=
"formFieldOptions"
:options=
"formFieldOptions
4Title
"
placeholder=
"请插入表单字段或输入文本"
placeholder=
"请插入表单字段
(输入 '{' 可以选择表单字段)
或输入文本"
class=
"w-600px!"
class=
"w-600px!"
/>
/>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
v-if=
"modelData.summarySetting && modelData.formType === BpmModelFormType.NORMAL"
class=
"mb-20px"
>
<
template
#
label
>
<el-text
size=
"large"
tag=
"b"
>
摘要设置
</el-text>
</
template
>
<div
class=
"flex flex-col"
>
<el-radio-group
v-model=
"modelData.summarySetting.enable"
>
<div
class=
"flex flex-col"
>
<el-radio
:value=
"false"
>
系统默认
<el-text
type=
"info"
>
展示表单前 3 个字段
</el-text>
</el-radio>
<el-radio
:value=
"true"
>
自定义摘要
</el-radio>
</div>
</el-radio-group>
<el-select
class=
"w-500px!"
v-if=
"modelData.summarySetting.enable"
v-model=
"modelData.summarySetting.summary"
multiple
placeholder=
"请选择要展示的表单字段"
>
<el-option
v-for=
"item in formFieldOptions4Summary"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</div>
</el-form-item>
</el-form>
</el-form>
</template>
</template>
...
@@ -174,21 +206,30 @@ const numberExample = computed(() => {
...
@@ -174,21 +206,30 @@ const numberExample = computed(() => {
})
})
/** 表单选项 */
/** 表单选项 */
const
formField
=
ref
<
Array
<
{
field
:
ProcessVariableEnum
;
title
:
string
}
>>
([])
const
formField
=
ref
<
Array
<
{
field
:
string
;
title
:
string
}
>>
([])
const
formFieldOptions
=
computed
(()
=>
{
const
formFieldOptions4Title
=
computed
(()
=>
{
let
cloneFormField
=
formField
.
value
.
map
((
item
)
=>
{
return
{
label
:
item
.
title
,
value
:
item
.
field
}
})
// 固定添加发起人 ID 字段
// 固定添加发起人 ID 字段
formField
.
value
.
unshift
({
cloneFormField
.
unshift
({
field
:
ProcessVariableEnum
.
PROCESS_DEFINITION_NAME
,
label
:
ProcessVariableEnum
.
PROCESS_DEFINITION_NAME
,
titl
e
:
'流程名称'
valu
e
:
'流程名称'
})
})
formField
.
value
.
unshift
({
cloneFormField
.
unshift
({
field
:
ProcessVariableEnum
.
START_TIME
,
label
:
ProcessVariableEnum
.
START_TIME
,
titl
e
:
'发起时间'
valu
e
:
'发起时间'
})
})
formField
.
value
.
unshift
({
cloneFormField
.
unshift
({
field
:
ProcessVariableEnum
.
START_USER_ID
,
label
:
ProcessVariableEnum
.
START_USER_ID
,
titl
e
:
'发起人'
valu
e
:
'发起人'
})
})
return
cloneFormField
})
const
formFieldOptions4Summary
=
computed
(()
=>
{
return
formField
.
value
.
map
((
item
)
=>
{
return
formField
.
value
.
map
((
item
)
=>
{
return
{
return
{
label
:
item
.
title
,
label
:
item
.
title
,
...
@@ -211,12 +252,18 @@ const initData = () => {
...
@@ -211,12 +252,18 @@ const initData = () => {
if
(
!
modelData
.
value
.
autoApprovalType
)
{
if
(
!
modelData
.
value
.
autoApprovalType
)
{
modelData
.
value
.
autoApprovalType
=
BpmAutoApproveType
.
NONE
modelData
.
value
.
autoApprovalType
=
BpmAutoApproveType
.
NONE
}
}
if
(
!
modelData
.
value
.
customT
itleSetting
)
{
if
(
!
modelData
.
value
.
t
itleSetting
)
{
modelData
.
value
.
customT
itleSetting
=
{
modelData
.
value
.
t
itleSetting
=
{
enable
:
false
,
enable
:
false
,
title
:
''
title
:
''
}
}
}
}
if
(
!
modelData
.
value
.
summarySetting
)
{
modelData
.
value
.
summarySetting
=
{
enable
:
false
,
summary
:
[]
}
}
}
}
defineExpose
({
initData
})
defineExpose
({
initData
})
...
@@ -224,9 +271,9 @@ defineExpose({ initData })
...
@@ -224,9 +271,9 @@ defineExpose({ initData })
watch
(
watch
(
()
=>
modelData
.
value
.
formId
,
()
=>
modelData
.
value
.
formId
,
async
(
newFormId
)
=>
{
async
(
newFormId
)
=>
{
if
(
newFormId
&&
modelData
.
value
.
formType
===
BpmModelFormType
.
CUSTOM
)
{
if
(
newFormId
&&
modelData
.
value
.
formType
===
BpmModelFormType
.
NORMAL
)
{
const
data
=
await
FormApi
.
getForm
(
newFormId
)
const
data
=
await
FormApi
.
getForm
(
newFormId
)
const
result
:
Array
<
{
field
:
ProcessVariableEnum
;
title
:
string
}
>
=
[]
const
result
:
Array
<
{
field
:
string
;
title
:
string
}
>
=
[]
if
(
data
.
fields
)
{
if
(
data
.
fields
)
{
data
.
fields
.
forEach
((
fieldStr
:
string
)
=>
{
data
.
fields
.
forEach
((
fieldStr
:
string
)
=>
{
parseFormFields
(
JSON
.
parse
(
fieldStr
),
result
)
parseFormFields
(
JSON
.
parse
(
fieldStr
),
result
)
...
...
src/views/bpm/model/form/index.vue
View file @
ab83cee5
...
@@ -155,9 +155,13 @@ const formData: any = ref({
...
@@ -155,9 +155,13 @@ const formData: any = ref({
length
:
5
length
:
5
},
},
autoApprovalType
:
BpmAutoApproveType
.
NONE
,
autoApprovalType
:
BpmAutoApproveType
.
NONE
,
customT
itleSetting
:
{
t
itleSetting
:
{
enable
:
false
,
enable
:
false
,
title
:
''
title
:
''
},
summarySetting
:
{
enable
:
false
,
summary
:
[]
}
}
})
})
...
...
src/views/bpm/processInstance/index.vue
View file @
ab83cee5
...
@@ -130,6 +130,15 @@
...
@@ -130,6 +130,15 @@
<ContentWrap>
<ContentWrap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"流程名称"
align=
"center"
prop=
"name"
min-width=
"200px"
fixed=
"left"
/>
<el-table-column
label=
"流程名称"
align=
"center"
prop=
"name"
min-width=
"200px"
fixed=
"left"
/>
<el-table-column
label=
"摘要"
prop=
"summary"
min-width=
"180"
fixed=
"left"
>
<
template
#
default=
"scope"
>
<div
class=
"flex flex-col"
v-if=
"scope.row.summary && scope.row.summary.length > 0"
>
<div
v-for=
"(item, index) in scope.row.summary"
:key=
"index"
>
<el-text
type=
"info"
>
{{
item
.
key
}}
:
{{
item
.
value
}}
</el-text>
</div>
</div>
</
template
>
</el-table-column>
<el-table-column
<el-table-column
label=
"流程分类"
label=
"流程分类"
align=
"center"
align=
"center"
...
...
src/views/bpm/task/done/index.vue
View file @
ab83cee5
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
:value=
"dict.value"
:value=
"dict.value"
/>
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<!-- 高级筛选 -->
<!-- 高级筛选 -->
<el-form-item
:style=
"
{ position: 'absolute', right: '0px' }">
<el-form-item
:style=
"
{ position: 'absolute', right: '0px' }">
...
@@ -77,9 +77,9 @@
...
@@ -77,9 +77,9 @@
>
>
<template
#
reference
>
<template
#
reference
>
<el-button
@
click=
"showPopover = !showPopover"
>
<el-button
@
click=
"showPopover = !showPopover"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
高级筛选
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
高级筛选
</el-button>
</el-button>
</
template
>
</
template
>
<el-form-item
label=
"流程发起人"
class=
"bold-label"
label-position=
"top"
prop=
"category"
>
<el-form-item
label=
"流程发起人"
class=
"bold-label"
label-position=
"top"
prop=
"category"
>
<el-select
<el-select
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
:value=
"category.code"
:value=
"category.code"
/>
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"发起时间"
class=
"bold-label"
label-position=
"top"
prop=
"createTime"
>
<el-form-item
label=
"发起时间"
class=
"bold-label"
label-position=
"top"
prop=
"createTime"
>
<el-date-picker
<el-date-picker
v-model=
"queryParams.createTime"
v-model=
"queryParams.createTime"
...
@@ -122,6 +122,15 @@
...
@@ -122,6 +122,15 @@
<ContentWrap>
<ContentWrap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
align=
"center"
label=
"流程"
prop=
"processInstance.name"
width=
"180"
/>
<el-table-column
align=
"center"
label=
"流程"
prop=
"processInstance.name"
width=
"180"
/>
<el-table-column
label=
"摘要"
prop=
"summary"
min-width=
"180"
>
<
template
#
default=
"scope"
>
<div
class=
"flex flex-col"
v-if=
"scope.row.summary && scope.row.summary.length > 0"
>
<div
v-for=
"(item, index) in scope.row.summary"
:key=
"index"
>
<el-text
type=
"info"
>
{{
item
.
key
}}
:
{{
item
.
value
}}
</el-text>
</div>
</div>
</
template
>
</el-table-column>
<el-table-column
<el-table-column
align=
"center"
align=
"center"
label=
"发起人"
label=
"发起人"
...
@@ -195,7 +204,7 @@ const queryParams = reactive({
...
@@ -195,7 +204,7 @@ const queryParams = reactive({
pageNo
:
1
,
pageNo
:
1
,
pageSize
:
10
,
pageSize
:
10
,
name
:
''
,
name
:
''
,
category
:
undefined
,
category
:
undefined
,
status
:
undefined
,
status
:
undefined
,
createTime
:
[]
createTime
:
[]
})
})
...
...
src/views/bpm/task/todo/index.vue
View file @
ab83cee5
...
@@ -60,9 +60,9 @@
...
@@ -60,9 +60,9 @@
>
>
<template
#
reference
>
<template
#
reference
>
<el-button
@
click=
"showPopover = !showPopover"
>
<el-button
@
click=
"showPopover = !showPopover"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
高级筛选
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
高级筛选
</el-button>
</el-button>
</
template
>
</
template
>
<el-form-item
label=
"流程发起人"
class=
"bold-label"
label-position=
"top"
prop=
"category"
>
<el-form-item
label=
"流程发起人"
class=
"bold-label"
label-position=
"top"
prop=
"category"
>
<el-select
<el-select
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
:value=
"category.code"
:value=
"category.code"
/>
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"发起时间"
class=
"bold-label"
label-position=
"top"
prop=
"createTime"
>
<el-form-item
label=
"发起时间"
class=
"bold-label"
label-position=
"top"
prop=
"createTime"
>
<el-date-picker
<el-date-picker
v-model=
"queryParams.createTime"
v-model=
"queryParams.createTime"
...
@@ -105,6 +105,15 @@
...
@@ -105,6 +105,15 @@
<ContentWrap>
<ContentWrap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
align=
"center"
label=
"流程"
prop=
"processInstance.name"
width=
"180"
/>
<el-table-column
align=
"center"
label=
"流程"
prop=
"processInstance.name"
width=
"180"
/>
<el-table-column
label=
"摘要"
prop=
"summary"
min-width=
"180"
>
<
template
#
default=
"scope"
>
<div
class=
"flex flex-col"
v-if=
"scope.row.summary && scope.row.summary.length > 0"
>
<div
v-for=
"(item, index) in scope.row.summary"
:key=
"index"
>
<el-text
type=
"info"
>
{{
item
.
key
}}
:
{{
item
.
value
}}
</el-text>
</div>
</div>
</
template
>
</el-table-column>
<el-table-column
<el-table-column
align=
"center"
align=
"center"
label=
"发起人"
label=
"发起人"
...
...
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