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
f1ac8ba6
authored
Jan 15, 2025
by
YunaiV
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
89c3af52
baa41166
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
29 deletions
+15
-29
src/components/SimpleProcessDesignerV2/src/node.ts
+9
-10
src/components/SimpleProcessDesignerV2/src/nodes/EndEventNode.vue
+1
-1
src/components/SimpleProcessDesignerV2/src/nodes/StartUserNode.vue
+2
-2
src/components/SimpleProcessDesignerV2/src/nodes/UserTaskNode.vue
+1
-1
src/views/bpm/processInstance/detail/ProcessInstanceSimpleViewer.vue
+1
-13
src/views/bpm/simple/SimpleModelDesign.vue
+1
-2
No files found.
src/components/SimpleProcessDesignerV2/src/node.ts
View file @
f1ac8ba6
import
{
cloneDeep
}
from
'lodash-es'
import
{
TaskStatusEnum
}
from
'@/api/bpm/task'
import
*
as
RoleApi
from
'@/api/system/role'
import
*
as
DeptApi
from
'@/api/system/dept'
...
...
@@ -47,9 +46,9 @@ export function useFormFieldsPermission(defaultPermission: FieldPermissionType)
// 字段权限配置. 需要有 field, title, permissioin 属性
const
fieldsPermissionConfig
=
ref
<
Array
<
Record
<
string
,
any
>>>
([])
const
formType
=
inject
<
Ref
<
number
>>
(
'formType'
)
// 表单类型
const
formType
=
inject
<
Ref
<
number
|
undefined
>>
(
'formType'
,
ref
()
)
// 表单类型
const
formFields
=
inject
<
Ref
<
string
[]
>>
(
'formFields'
)
// 流程表单字段
const
formFields
=
inject
<
Ref
<
string
[]
>>
(
'formFields'
,
ref
([])
)
// 流程表单字段
const
getNodeConfigFormFields
=
(
nodeFormFields
?:
Array
<
Record
<
string
,
string
>>
)
=>
{
nodeFormFields
=
toRaw
(
nodeFormFields
)
...
...
@@ -170,13 +169,13 @@ export type CopyTaskFormType = {
* @description 节点表单数据。 用于审批节点、抄送节点
*/
export
function
useNodeForm
(
nodeType
:
NodeType
)
{
const
roleOptions
=
inject
<
Ref
<
RoleApi
.
RoleVO
[]
>>
(
'roleList'
)
// 角色列表
const
postOptions
=
inject
<
Ref
<
PostApi
.
PostVO
[]
>>
(
'postList'
)
// 岗位列表
const
userOptions
=
inject
<
Ref
<
UserApi
.
UserVO
[]
>>
(
'userList'
)
// 用户列表
const
deptOptions
=
inject
<
Ref
<
DeptApi
.
DeptVO
[]
>>
(
'deptList'
)
// 部门列表
const
userGroupOptions
=
inject
<
Ref
<
UserGroupApi
.
UserGroupVO
[]
>>
(
'userGroupList'
)
// 用户组列表
const
deptTreeOptions
=
inject
(
'deptTree'
)
// 部门树
const
formFields
=
inject
<
Ref
<
string
[]
>>
(
'formFields'
)
// 流程表单字段
const
roleOptions
=
inject
<
Ref
<
RoleApi
.
RoleVO
[]
>>
(
'roleList'
,
ref
([])
)
// 角色列表
const
postOptions
=
inject
<
Ref
<
PostApi
.
PostVO
[]
>>
(
'postList'
,
ref
([])
)
// 岗位列表
const
userOptions
=
inject
<
Ref
<
UserApi
.
UserVO
[]
>>
(
'userList'
,
ref
([])
)
// 用户列表
const
deptOptions
=
inject
<
Ref
<
DeptApi
.
DeptVO
[]
>>
(
'deptList'
,
ref
([])
)
// 部门列表
const
userGroupOptions
=
inject
<
Ref
<
UserGroupApi
.
UserGroupVO
[]
>>
(
'userGroupList'
,
ref
([])
)
// 用户组列表
const
deptTreeOptions
=
inject
(
'deptTree'
,
ref
()
)
// 部门树
const
formFields
=
inject
<
Ref
<
string
[]
>>
(
'formFields'
,
ref
([])
)
// 流程表单字段
const
configForm
=
ref
<
UserTaskFormType
|
CopyTaskFormType
>
()
if
(
nodeType
===
NodeType
.
USER_TASK_NODE
)
{
configForm
.
value
=
{
...
...
src/components/SimpleProcessDesignerV2/src/nodes/EndEventNode.vue
View file @
f1ac8ba6
...
...
@@ -77,7 +77,7 @@ const props = defineProps({
const
currentNode
=
useWatchNode
(
props
)
// 是否只读
const
readonly
=
inject
<
Boolean
>
(
'readonly'
)
const
processInstance
=
inject
<
Ref
<
any
>>
(
'processInstance'
)
const
processInstance
=
inject
<
Ref
<
any
>>
(
'processInstance'
,
ref
({})
)
// 审批信息的弹窗显示,用于只读模式
const
dialogVisible
=
ref
(
false
)
// 弹窗可见性
const
processInstanceInfos
=
ref
<
any
[]
>
([])
// 流程的审批信息
...
...
src/components/SimpleProcessDesignerV2/src/nodes/StartUserNode.vue
View file @
f1ac8ba6
...
...
@@ -13,7 +13,7 @@
><span
class=
"iconfont icon-start-user"
></span
></div>
<input
v-if=
"showInput"
v-if=
"
!readonly &&
showInput"
type=
"text"
class=
"editable-title-input"
@
blur=
"blurEvent()"
...
...
@@ -117,7 +117,7 @@ const props = defineProps({
}
})
const
readonly
=
inject
<
Boolean
>
(
'readonly'
)
// 是否只读
const
tasks
=
inject
<
Ref
<
any
[]
>>
(
'tasks'
)
const
tasks
=
inject
<
Ref
<
any
[]
>>
(
'tasks'
,
ref
([])
)
// 定义事件,更新父组件。
const
emits
=
defineEmits
<
{
'update:modelValue'
:
[
node
:
SimpleFlowNode
|
undefined
]
...
...
src/components/SimpleProcessDesignerV2/src/nodes/UserTaskNode.vue
View file @
f1ac8ba6
...
...
@@ -131,7 +131,7 @@ const emits = defineEmits<{
// 是否只读
const
readonly
=
inject
<
Boolean
>
(
'readonly'
)
const
tasks
=
inject
<
Ref
<
any
[]
>>
(
'tasks'
)
const
tasks
=
inject
<
Ref
<
any
[]
>>
(
'tasks'
,
ref
([])
)
// 监控节点变化
const
currentNode
=
useWatchNode
(
props
)
// 节点名称编辑
...
...
src/views/bpm/processInstance/detail/ProcessInstanceSimpleViewer.vue
View file @
f1ac8ba6
...
...
@@ -4,7 +4,6 @@
:flow-node=
"simpleModel"
:tasks=
"tasks"
:process-instance=
"processInstance"
class=
"process-viewer"
/>
</div>
</
template
>
...
...
@@ -20,7 +19,7 @@ const props = defineProps({
modelView
:
propTypes
.
object
,
simpleJson
:
propTypes
.
string
// Simple 模型结构数据 (json 格式)
})
const
simpleModel
=
ref
(
)
const
simpleModel
=
ref
<
any
>
({}
)
// 用户任务
const
tasks
=
ref
([])
// 流程实例
...
...
@@ -161,15 +160,4 @@ const setSimpleModelNodeTaskStatus = (
</
script
>
<
style
lang=
"scss"
scoped
>
.process-viewer-container
{
width
:
100%
;
height
:
100%
;
:deep(.process-viewer)
{
width
:
100%
;
height
:
100%
!important
;
min-height
:
100%
;
overflow
:
auto
;
}
}
</
style
>
src/views/bpm/simple/SimpleModelDesign.vue
View file @
f1ac8ba6
...
...
@@ -23,7 +23,7 @@ const props = defineProps<{
modelId
?:
string
modelKey
?:
string
modelName
?:
string
value
?:
string
value
?:
any
startUserIds
?:
number
[]
}
>
()
...
...
@@ -34,7 +34,6 @@ const currentValue = ref('')
// 初始化或更新当前值
const
initOrUpdateValue
=
async
()
=>
{
console
.
log
(
'initOrUpdateValue'
,
props
.
value
)
if
(
props
.
value
)
{
currentValue
.
value
=
props
.
value
// 如果设计器已经初始化,立即加载数据
...
...
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