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
baa41166
authored
Jan 13, 2025
by
jason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【功能修复】修复审批详情页面,控制台警告问题
parent
77938c38
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 @
baa41166
import
{
cloneDeep
}
from
'lodash-es'
import
{
TaskStatusEnum
}
from
'@/api/bpm/task'
import
{
TaskStatusEnum
}
from
'@/api/bpm/task'
import
*
as
RoleApi
from
'@/api/system/role'
import
*
as
RoleApi
from
'@/api/system/role'
import
*
as
DeptApi
from
'@/api/system/dept'
import
*
as
DeptApi
from
'@/api/system/dept'
...
@@ -47,9 +46,9 @@ export function useFormFieldsPermission(defaultPermission: FieldPermissionType)
...
@@ -47,9 +46,9 @@ export function useFormFieldsPermission(defaultPermission: FieldPermissionType)
// 字段权限配置. 需要有 field, title, permissioin 属性
// 字段权限配置. 需要有 field, title, permissioin 属性
const
fieldsPermissionConfig
=
ref
<
Array
<
Record
<
string
,
any
>>>
([])
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
>>
)
=>
{
const
getNodeConfigFormFields
=
(
nodeFormFields
?:
Array
<
Record
<
string
,
string
>>
)
=>
{
nodeFormFields
=
toRaw
(
nodeFormFields
)
nodeFormFields
=
toRaw
(
nodeFormFields
)
...
@@ -170,13 +169,13 @@ export type CopyTaskFormType = {
...
@@ -170,13 +169,13 @@ export type CopyTaskFormType = {
* @description 节点表单数据。 用于审批节点、抄送节点
* @description 节点表单数据。 用于审批节点、抄送节点
*/
*/
export
function
useNodeForm
(
nodeType
:
NodeType
)
{
export
function
useNodeForm
(
nodeType
:
NodeType
)
{
const
roleOptions
=
inject
<
Ref
<
RoleApi
.
RoleVO
[]
>>
(
'roleList'
)
// 角色列表
const
roleOptions
=
inject
<
Ref
<
RoleApi
.
RoleVO
[]
>>
(
'roleList'
,
ref
([])
)
// 角色列表
const
postOptions
=
inject
<
Ref
<
PostApi
.
PostVO
[]
>>
(
'postList'
)
// 岗位列表
const
postOptions
=
inject
<
Ref
<
PostApi
.
PostVO
[]
>>
(
'postList'
,
ref
([])
)
// 岗位列表
const
userOptions
=
inject
<
Ref
<
UserApi
.
UserVO
[]
>>
(
'userList'
)
// 用户列表
const
userOptions
=
inject
<
Ref
<
UserApi
.
UserVO
[]
>>
(
'userList'
,
ref
([])
)
// 用户列表
const
deptOptions
=
inject
<
Ref
<
DeptApi
.
DeptVO
[]
>>
(
'deptList'
)
// 部门列表
const
deptOptions
=
inject
<
Ref
<
DeptApi
.
DeptVO
[]
>>
(
'deptList'
,
ref
([])
)
// 部门列表
const
userGroupOptions
=
inject
<
Ref
<
UserGroupApi
.
UserGroupVO
[]
>>
(
'userGroupList'
)
// 用户组列表
const
userGroupOptions
=
inject
<
Ref
<
UserGroupApi
.
UserGroupVO
[]
>>
(
'userGroupList'
,
ref
([])
)
// 用户组列表
const
deptTreeOptions
=
inject
(
'deptTree'
)
// 部门树
const
deptTreeOptions
=
inject
(
'deptTree'
,
ref
()
)
// 部门树
const
formFields
=
inject
<
Ref
<
string
[]
>>
(
'formFields'
)
// 流程表单字段
const
formFields
=
inject
<
Ref
<
string
[]
>>
(
'formFields'
,
ref
([])
)
// 流程表单字段
const
configForm
=
ref
<
UserTaskFormType
|
CopyTaskFormType
>
()
const
configForm
=
ref
<
UserTaskFormType
|
CopyTaskFormType
>
()
if
(
nodeType
===
NodeType
.
USER_TASK_NODE
)
{
if
(
nodeType
===
NodeType
.
USER_TASK_NODE
)
{
configForm
.
value
=
{
configForm
.
value
=
{
...
...
src/components/SimpleProcessDesignerV2/src/nodes/EndEventNode.vue
View file @
baa41166
...
@@ -77,7 +77,7 @@ const props = defineProps({
...
@@ -77,7 +77,7 @@ const props = defineProps({
const
currentNode
=
useWatchNode
(
props
)
const
currentNode
=
useWatchNode
(
props
)
// 是否只读
// 是否只读
const
readonly
=
inject
<
Boolean
>
(
'readonly'
)
const
readonly
=
inject
<
Boolean
>
(
'readonly'
)
const
processInstance
=
inject
<
Ref
<
any
>>
(
'processInstance'
)
const
processInstance
=
inject
<
Ref
<
any
>>
(
'processInstance'
,
ref
({})
)
// 审批信息的弹窗显示,用于只读模式
// 审批信息的弹窗显示,用于只读模式
const
dialogVisible
=
ref
(
false
)
// 弹窗可见性
const
dialogVisible
=
ref
(
false
)
// 弹窗可见性
const
processInstanceInfos
=
ref
<
any
[]
>
([])
// 流程的审批信息
const
processInstanceInfos
=
ref
<
any
[]
>
([])
// 流程的审批信息
...
...
src/components/SimpleProcessDesignerV2/src/nodes/StartUserNode.vue
View file @
baa41166
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
><span
class=
"iconfont icon-start-user"
></span
><span
class=
"iconfont icon-start-user"
></span
></div>
></div>
<input
<input
v-if=
"showInput"
v-if=
"
!readonly &&
showInput"
type=
"text"
type=
"text"
class=
"editable-title-input"
class=
"editable-title-input"
@
blur=
"blurEvent()"
@
blur=
"blurEvent()"
...
@@ -117,7 +117,7 @@ const props = defineProps({
...
@@ -117,7 +117,7 @@ const props = defineProps({
}
}
})
})
const
readonly
=
inject
<
Boolean
>
(
'readonly'
)
// 是否只读
const
readonly
=
inject
<
Boolean
>
(
'readonly'
)
// 是否只读
const
tasks
=
inject
<
Ref
<
any
[]
>>
(
'tasks'
)
const
tasks
=
inject
<
Ref
<
any
[]
>>
(
'tasks'
,
ref
([])
)
// 定义事件,更新父组件。
// 定义事件,更新父组件。
const
emits
=
defineEmits
<
{
const
emits
=
defineEmits
<
{
'update:modelValue'
:
[
node
:
SimpleFlowNode
|
undefined
]
'update:modelValue'
:
[
node
:
SimpleFlowNode
|
undefined
]
...
...
src/components/SimpleProcessDesignerV2/src/nodes/UserTaskNode.vue
View file @
baa41166
...
@@ -131,7 +131,7 @@ const emits = defineEmits<{
...
@@ -131,7 +131,7 @@ const emits = defineEmits<{
// 是否只读
// 是否只读
const
readonly
=
inject
<
Boolean
>
(
'readonly'
)
const
readonly
=
inject
<
Boolean
>
(
'readonly'
)
const
tasks
=
inject
<
Ref
<
any
[]
>>
(
'tasks'
)
const
tasks
=
inject
<
Ref
<
any
[]
>>
(
'tasks'
,
ref
([])
)
// 监控节点变化
// 监控节点变化
const
currentNode
=
useWatchNode
(
props
)
const
currentNode
=
useWatchNode
(
props
)
// 节点名称编辑
// 节点名称编辑
...
...
src/views/bpm/processInstance/detail/ProcessInstanceSimpleViewer.vue
View file @
baa41166
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
:flow-node=
"simpleModel"
:flow-node=
"simpleModel"
:tasks=
"tasks"
:tasks=
"tasks"
:process-instance=
"processInstance"
:process-instance=
"processInstance"
class=
"process-viewer"
/>
/>
</div>
</div>
</
template
>
</
template
>
...
@@ -20,7 +19,7 @@ const props = defineProps({
...
@@ -20,7 +19,7 @@ const props = defineProps({
modelView
:
propTypes
.
object
,
modelView
:
propTypes
.
object
,
simpleJson
:
propTypes
.
string
// Simple 模型结构数据 (json 格式)
simpleJson
:
propTypes
.
string
// Simple 模型结构数据 (json 格式)
})
})
const
simpleModel
=
ref
(
)
const
simpleModel
=
ref
<
any
>
({}
)
// 用户任务
// 用户任务
const
tasks
=
ref
([])
const
tasks
=
ref
([])
// 流程实例
// 流程实例
...
@@ -161,15 +160,4 @@ const setSimpleModelNodeTaskStatus = (
...
@@ -161,15 +160,4 @@ const setSimpleModelNodeTaskStatus = (
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
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
>
</
style
>
src/views/bpm/simple/SimpleModelDesign.vue
View file @
baa41166
...
@@ -23,7 +23,7 @@ const props = defineProps<{
...
@@ -23,7 +23,7 @@ const props = defineProps<{
modelId
?:
string
modelId
?:
string
modelKey
?:
string
modelKey
?:
string
modelName
?:
string
modelName
?:
string
value
?:
string
value
?:
any
startUserIds
?:
number
[]
startUserIds
?:
number
[]
}
>
()
}
>
()
...
@@ -34,7 +34,6 @@ const currentValue = ref('')
...
@@ -34,7 +34,6 @@ const currentValue = ref('')
// 初始化或更新当前值
// 初始化或更新当前值
const
initOrUpdateValue
=
async
()
=>
{
const
initOrUpdateValue
=
async
()
=>
{
console
.
log
(
'initOrUpdateValue'
,
props
.
value
)
if
(
props
.
value
)
{
if
(
props
.
value
)
{
currentValue
.
value
=
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