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
4319d869
authored
Jan 24, 2025
by
GoldenZqqq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "fix: 优化Simple设计器接口调用逻辑与去除loading效果"
This reverts commit
b3a97b08
.
parent
7f50584a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
44 deletions
+2
-44
src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue
+2
-44
No files found.
src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue
View file @
4319d869
<
template
>
<div
class=
"overflow-auto"
>
<div
v-loading=
"loading"
class=
"overflow-auto"
>
<SimpleProcessModel
ref=
"simpleProcessModelRef"
v-if=
"processNodeTree"
...
...
@@ -72,7 +72,6 @@ const userOptions = ref<UserApi.UserVO[]>([]) // 用户列表
const
deptOptions
=
ref
<
DeptApi
.
DeptVO
[]
>
([])
// 部门列表
const
deptTreeOptions
=
ref
()
const
userGroupOptions
=
ref
<
UserGroupApi
.
UserGroupVO
[]
>
([])
// 用户组列表
const
isDataInitialized
=
ref
(
false
)
// 添加标记,用于判断数据是否已初始化
provide
(
'formFields'
,
formFields
)
provide
(
'formType'
,
formType
)
...
...
@@ -161,32 +160,9 @@ const validateNode = (node: SimpleFlowNode | undefined, errorNodes: SimpleFlowNo
}
}
// 初始化数据的方法
const
initializeData
=
async
()
=>
{
if
(
isDataInitialized
.
value
)
{
return
}
onMounted
(
async
()
=>
{
try
{
loading
.
value
=
true
// 并行加载所有数据
const
[
roleList
,
postList
,
userList
,
deptList
,
userGroupList
]
=
await
Promise
.
all
([
RoleApi
.
getSimpleRoleList
(),
PostApi
.
getSimplePostList
(),
UserApi
.
getSimpleUserList
(),
DeptApi
.
getSimpleDeptList
(),
UserGroupApi
.
getUserGroupSimpleList
()
])
// 更新数据
roleOptions
.
value
=
roleList
postOptions
.
value
=
postList
userOptions
.
value
=
userList
deptOptions
.
value
=
deptList
deptTreeOptions
.
value
=
handleTree
(
deptList
as
DeptApi
.
DeptVO
[],
'id'
)
userGroupOptions
.
value
=
userGroupList
// 获取表单字段
if
(
props
.
modelId
)
{
const
bpmnModel
=
await
getModel
(
props
.
modelId
)
...
...
@@ -215,27 +191,9 @@ const initializeData = async () => {
}
else
{
updateModel
()
}
isDataInitialized
.
value
=
true
}
catch
(
error
)
{
console
.
error
(
'初始化数据失败:'
,
error
)
}
finally
{
loading
.
value
=
false
}
}
onMounted
(
async
()
=>
{
await
initializeData
()
})
// 添加 activated 生命周期钩子
onActivated
(()
=>
{
// 组件被激活时,只需要刷新视图
if
(
isDataInitialized
.
value
)
{
refresh
()
}
else
{
initializeData
()
}
})
const
simpleProcessModelRef
=
ref
()
...
...
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