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
62ad5431
authored
Jan 26, 2025
by
jason
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/bpm' of
https://gitee.com/yudaocode/yudao-ui-admin-vue3
into feature/bpm
parents
503a35f4
bd48210d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
11 deletions
+36
-11
src/components/SimpleProcessDesignerV2/src/node.ts
+7
-5
src/router/modules/remaining.ts
+12
-0
src/views/bpm/model/CategoryDraggableModel.vue
+4
-1
src/views/bpm/processInstance/report/index.vue
+13
-5
No files found.
src/components/SimpleProcessDesignerV2/src/node.ts
View file @
62ad5431
...
@@ -106,14 +106,16 @@ export function useFormFieldsPermission(defaultPermission: FieldPermissionType)
...
@@ -106,14 +106,16 @@ export function useFormFieldsPermission(defaultPermission: FieldPermissionType)
getNodeConfigFormFields
getNodeConfigFormFields
}
}
}
}
/**
/**
* @description 获取流程表单的字段
。
* @description 获取流程表单的字段
*/
*/
export
function
useFormFields
()
{
export
function
useFormFields
()
{
const
formFields
=
inject
<
Ref
<
string
[]
>>
(
'formFields'
,
ref
([]))
// 流程表单字段
const
formFields
=
inject
<
Ref
<
string
[]
>>
(
'formFields'
,
ref
([]))
// 流程表单字段
return
parseFormCreateFields
(
unref
(
formFields
))
return
parseFormCreateFields
(
unref
(
formFields
))
}
}
// TODO @芋艿:后续需要把各种类似 useFormFieldsPermission 的逻辑,抽成一个通用方法。
/**
/**
* @description 获取流程表单的字段和发起人字段
* @description 获取流程表单的字段和发起人字段
*/
*/
...
@@ -155,19 +157,19 @@ export type UserTaskFormType = {
...
@@ -155,19 +157,19 @@ export type UserTaskFormType = {
taskCreateListenerEnable
?:
boolean
taskCreateListenerEnable
?:
boolean
taskCreateListenerPath
?:
string
taskCreateListenerPath
?:
string
taskCreateListener
?:
{
taskCreateListener
?:
{
header
:
HttpRequestParam
[]
,
header
:
HttpRequestParam
[]
body
:
HttpRequestParam
[]
body
:
HttpRequestParam
[]
}
}
taskAssignListenerEnable
?:
boolean
taskAssignListenerEnable
?:
boolean
taskAssignListenerPath
?:
string
taskAssignListenerPath
?:
string
taskAssignListener
?:
{
taskAssignListener
?:
{
header
:
HttpRequestParam
[]
,
header
:
HttpRequestParam
[]
body
:
HttpRequestParam
[]
body
:
HttpRequestParam
[]
}
}
taskCompleteListenerEnable
?:
boolean
taskCompleteListenerEnable
?:
boolean
taskCompleteListenerPath
?:
string
taskCompleteListenerPath
?:
string
taskCompleteListener
?:{
taskCompleteListener
?:
{
header
:
HttpRequestParam
[]
,
header
:
HttpRequestParam
[]
body
:
HttpRequestParam
[]
body
:
HttpRequestParam
[]
}
}
signEnable
:
boolean
signEnable
:
boolean
...
...
src/router/modules/remaining.ts
View file @
62ad5431
...
@@ -308,6 +308,18 @@ const remainingRouter: AppRouteRecordRaw[] = [
...
@@ -308,6 +308,18 @@ const remainingRouter: AppRouteRecordRaw[] = [
})
})
},
},
{
{
path
:
'process-instance/report'
,
component
:
()
=>
import
(
'@/views/bpm/processInstance/report/index.vue'
),
name
:
'BpmProcessInstanceReport'
,
meta
:
{
noCache
:
true
,
hidden
:
true
,
canTo
:
true
,
title
:
'数据报表'
,
activeMenu
:
'/bpm/manager/model'
}
},
{
path
:
'oa/leave/create'
,
path
:
'oa/leave/create'
,
component
:
()
=>
import
(
'@/views/bpm/oa/leave/create.vue'
),
component
:
()
=>
import
(
'@/views/bpm/oa/leave/create.vue'
),
name
:
'OALeaveCreate'
,
name
:
'OALeaveCreate'
,
...
...
src/views/bpm/model/CategoryDraggableModel.vue
View file @
62ad5431
...
@@ -194,7 +194,10 @@
...
@@ -194,7 +194,10 @@
</el-dropdown-item>
</el-dropdown-item>
<el-dropdown-item
<el-dropdown-item
command=
"handleReport"
command=
"handleReport"
v-if=
"checkPermi(['bpm:model:report']) && scope.row.processDefinition"
v-if=
"
checkPermi(['bpm:process-instance:manager-query']) &&
scope.row.processDefinition
"
:disabled=
"!isManagerUser(scope.row)"
:disabled=
"!isManagerUser(scope.row)"
>
>
报表
报表
...
...
src/views/bpm/processInstance/report/index.vue
View file @
62ad5431
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
:label=
"item.title"
:label=
"item.title"
:prop=
"item.field"
:prop=
"item.field"
>
>
<!-- TODO 目前只支持input类型的字符串搜索 -->
<!-- TODO
@lesan:
目前只支持input类型的字符串搜索 -->
<el-input
<el-input
:disabled=
"item.type !== 'input'"
:disabled=
"item.type !== 'input'"
v-model=
"queryParams.formFieldsParams[item.field]"
v-model=
"queryParams.formFieldsParams[item.field]"
...
@@ -120,11 +120,12 @@
...
@@ -120,11 +120,12 @@
:prop=
"item.field"
:prop=
"item.field"
width=
"120"
width=
"120"
>
>
<!-- TODO 可以根据formField的type进行展示方式的控制,现在全部以字符串 -->
<!-- TODO
@lesan:
可以根据formField的type进行展示方式的控制,现在全部以字符串 -->
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
{{
scope
.
row
.
formVariables
[
item
.
field
]
??
''
}}
{{
scope
.
row
.
formVariables
[
item
.
field
]
??
''
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<!-- TODO @lesan:可能要类似 manager 那,加个详情和取消? -->
</el-table>
</el-table>
<!-- 分页 -->
<!-- 分页 -->
<Pagination
<Pagination
...
@@ -170,9 +171,10 @@ const userList = ref<any[]>([]) // 用户列表
...
@@ -170,9 +171,10 @@ const userList = ref<any[]>([]) // 用户列表
const
getList
=
async
()
=>
{
const
getList
=
async
()
=>
{
loading
.
value
=
true
loading
.
value
=
true
try
{
try
{
let
queryParamsClone
=
{
...
queryParams
}
const
data
=
await
ProcessInstanceApi
.
getProcessInstanceManagerPage
({
queryParamsClone
.
formFieldsParams
=
JSON
.
stringify
(
queryParamsClone
.
formFieldsParams
)
...
queryParams
,
const
data
=
await
ProcessInstanceApi
.
getProcessInstanceManagerPage
(
queryParamsClone
)
formFieldsParams
:
JSON
.
stringify
(
queryParams
.
formFieldsParams
)
})
list
.
value
=
data
.
list
list
.
value
=
data
.
list
total
.
value
=
data
.
total
total
.
value
=
data
.
total
}
finally
{
}
finally
{
...
@@ -180,11 +182,13 @@ const getList = async () => {
...
@@ -180,11 +182,13 @@ const getList = async () => {
}
}
}
}
/** 获取流程定义 */
const
getProcessDefinition
=
async
()
=>
{
const
getProcessDefinition
=
async
()
=>
{
const
processDefinition
=
await
DefinitionApi
.
getProcessDefinition
(
processDefinitionId
)
const
processDefinition
=
await
DefinitionApi
.
getProcessDefinition
(
processDefinitionId
)
formFields
.
value
=
parseFormCreateFields
(
processDefinition
.
formFields
)
formFields
.
value
=
parseFormCreateFields
(
processDefinition
.
formFields
)
}
}
/** 解析表单字段 */
const
parseFormCreateFields
=
(
formFields
?:
string
[])
=>
{
const
parseFormCreateFields
=
(
formFields
?:
string
[])
=>
{
const
result
:
Array
<
Record
<
string
,
any
>>
=
[]
const
result
:
Array
<
Record
<
string
,
any
>>
=
[]
if
(
formFields
)
{
if
(
formFields
)
{
...
@@ -202,6 +206,7 @@ const handleQuery = () => {
...
@@ -202,6 +206,7 @@ const handleQuery = () => {
}
}
/** 重置按钮操作 */
/** 重置按钮操作 */
// TODO @lesan:动态表单的 search ,无法重置的样子
const
resetQuery
=
()
=>
{
const
resetQuery
=
()
=>
{
queryFormRef
.
value
.
resetFields
()
queryFormRef
.
value
.
resetFields
()
queryFormRef
.
value
.
formFieldsParams
=
{}
queryFormRef
.
value
.
formFieldsParams
=
{}
...
@@ -210,8 +215,11 @@ const resetQuery = () => {
...
@@ -210,8 +215,11 @@ const resetQuery = () => {
/** 初始化 **/
/** 初始化 **/
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
// 获取流程定义,用于 table column 的展示
await
getProcessDefinition
()
await
getProcessDefinition
()
// 获取流程列表
await
getList
()
await
getList
()
// 获取用户列表
userList
.
value
=
await
UserApi
.
getSimpleUserList
()
userList
.
value
=
await
UserApi
.
getSimpleUserList
()
})
})
</
script
>
</
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