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
79a53412
authored
Jan 26, 2025
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【代码评审】Bpm:数据报表
parent
f35f62d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
src/components/SimpleProcessDesignerV2/src/node.ts
+7
-5
src/views/bpm/processInstance/report/index.vue
+8
-2
No files found.
src/components/SimpleProcessDesignerV2/src/node.ts
View file @
79a53412
...
...
@@ -106,14 +106,16 @@ export function useFormFieldsPermission(defaultPermission: FieldPermissionType)
getNodeConfigFormFields
}
}
/**
* @description 获取流程表单的字段
。
* @description 获取流程表单的字段
*/
export
function
useFormFields
()
{
const
formFields
=
inject
<
Ref
<
string
[]
>>
(
'formFields'
,
ref
([]))
// 流程表单字段
return
parseFormCreateFields
(
unref
(
formFields
))
}
// TODO @芋艿:后续需要把各种类似 useFormFieldsPermission 的逻辑,抽成一个通用方法。
/**
* @description 获取流程表单的字段和发起人字段
*/
...
...
@@ -155,19 +157,19 @@ export type UserTaskFormType = {
taskCreateListenerEnable
?:
boolean
taskCreateListenerPath
?:
string
taskCreateListener
?:
{
header
:
HttpRequestParam
[]
,
header
:
HttpRequestParam
[]
body
:
HttpRequestParam
[]
}
taskAssignListenerEnable
?:
boolean
taskAssignListenerPath
?:
string
taskAssignListener
?:
{
header
:
HttpRequestParam
[]
,
header
:
HttpRequestParam
[]
body
:
HttpRequestParam
[]
}
taskCompleteListenerEnable
?:
boolean
taskCompleteListenerPath
?:
string
taskCompleteListener
?:{
header
:
HttpRequestParam
[]
,
taskCompleteListener
?:
{
header
:
HttpRequestParam
[]
body
:
HttpRequestParam
[]
}
signEnable
:
boolean
...
...
src/views/bpm/processInstance/report/index.vue
View file @
79a53412
...
...
@@ -72,7 +72,7 @@
:label=
"item.title"
:prop=
"item.field"
>
<!-- TODO 目前只支持input类型的字符串搜索 -->
<!-- TODO
@lesan:
目前只支持input类型的字符串搜索 -->
<el-input
:disabled=
"item.type !== 'input'"
v-model=
"queryParams.formFieldsParams[item.field]"
...
...
@@ -120,11 +120,12 @@
:prop=
"item.field"
width=
"120"
>
<!-- TODO 可以根据formField的type进行展示方式的控制,现在全部以字符串 -->
<!-- TODO
@lesan:
可以根据formField的type进行展示方式的控制,现在全部以字符串 -->
<
template
#
default=
"scope"
>
{{
scope
.
row
.
formVariables
[
item
.
field
]
??
''
}}
</
template
>
</el-table-column>
<!-- TODO @lesan:可能要类似 manager 那,加个详情和取消? -->
</el-table>
<!-- 分页 -->
<Pagination
...
...
@@ -180,11 +181,13 @@ const getList = async () => {
}
}
/** 获取流程定义 */
const
getProcessDefinition
=
async
()
=>
{
const
processDefinition
=
await
DefinitionApi
.
getProcessDefinition
(
processDefinitionId
)
formFields
.
value
=
parseFormCreateFields
(
processDefinition
.
formFields
)
}
/** 解析表单字段 */
const
parseFormCreateFields
=
(
formFields
?:
string
[])
=>
{
const
result
:
Array
<
Record
<
string
,
any
>>
=
[]
if
(
formFields
)
{
...
...
@@ -210,8 +213,11 @@ const resetQuery = () => {
/** 初始化 **/
onMounted
(
async
()
=>
{
// 获取流程定义,用于 table column 的展示
await
getProcessDefinition
()
// 获取流程列表
await
getList
()
// 获取用户列表
userList
.
value
=
await
UserApi
.
getSimpleUserList
()
})
</
script
>
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