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
58fc91b8
authored
Jun 19, 2024
by
jason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
仿钉钉设计器-字段权限顺序调整
parent
5ee0a7b9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
22 deletions
+22
-22
src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
+13
-13
src/components/SimpleProcessDesignerV2/src/utils.ts
+9
-9
No files found.
src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
View file @
58fc91b8
...
@@ -149,7 +149,11 @@
...
@@ -149,7 +149,11 @@
@
change=
"approveMethodChanged"
@
change=
"approveMethodChanged"
>
>
<div
class=
"flex-col"
>
<div
class=
"flex-col"
>
<div
v-for=
"(item, index) in APPROVE_METHODS"
:key=
"index"
class=
"flex items-center"
>
<div
v-for=
"(item, index) in APPROVE_METHODS"
:key=
"index"
class=
"flex items-center"
>
<el-radio
<el-radio
:value=
"item.value"
:value=
"item.value"
:label=
"item.value"
:label=
"item.value"
...
@@ -166,7 +170,10 @@
...
@@ -166,7 +170,10 @@
:max=
"100"
:max=
"100"
:step=
"10"
:step=
"10"
size=
"small"
size=
"small"
v-if=
"item.value === ApproveMethodType.APPROVE_BY_RATIO && currentNode.attributes.approveMethod === ApproveMethodType.APPROVE_BY_RATIO"
v-if=
"
item.value === ApproveMethodType.APPROVE_BY_RATIO &&
currentNode.attributes.approveMethod === ApproveMethodType.APPROVE_BY_RATIO
"
/>
/>
</div>
</div>
</div>
</div>
...
@@ -177,21 +184,14 @@
...
@@ -177,21 +184,14 @@
<el-radio-group
v-model=
"currentNode.attributes.rejectHandler.type"
>
<el-radio-group
v-model=
"currentNode.attributes.rejectHandler.type"
>
<div
class=
"flex-col"
>
<div
class=
"flex-col"
>
<div
v-for=
"(item, index) in REJECT_HANDLER_TYPES"
:key=
"index"
>
<div
v-for=
"(item, index) in REJECT_HANDLER_TYPES"
:key=
"index"
>
<el-radio
<el-radio
:key=
"item.value"
:value=
"item.value"
:label=
"item.label"
/>
:key=
"item.value"
:value=
"item.value"
:label=
"item.label"
/>
</div>
</div>
</div>
</div>
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
v-if=
"
v-if=
"currentNode.attributes.rejectHandler.type == RejectHandlerType.RETURN_USER_TASK"
currentNode.attributes.rejectHandler.type == RejectHandlerType.RETURN_USER_TASK
"
label=
"驳回节点"
label=
"驳回节点"
prop=
"rejectHandlerNode"
prop=
"rejectHandlerNode"
>
>
...
@@ -282,8 +282,8 @@
...
@@ -282,8 +282,8 @@
<div
class=
"field-permit-title"
>
<div
class=
"field-permit-title"
>
<div
class=
"setting-title-label first-title"
>
字段名称
</div>
<div
class=
"setting-title-label first-title"
>
字段名称
</div>
<div
class=
"other-titles"
>
<div
class=
"other-titles"
>
<span
class=
"setting-title-label"
>
可编辑
</span>
<span
class=
"setting-title-label"
>
只读
</span>
<span
class=
"setting-title-label"
>
只读
</span>
<span
class=
"setting-title-label"
>
可编辑
</span>
<span
class=
"setting-title-label"
>
隐藏
</span>
<span
class=
"setting-title-label"
>
隐藏
</span>
</div>
</div>
</div>
</div>
...
@@ -542,7 +542,7 @@ const approveMethodChanged = () => {
...
@@ -542,7 +542,7 @@ const approveMethodChanged = () => {
currentNode
.
value
.
attributes
.
rejectHandler
.
type
=
RejectHandlerType
.
FINISH_PROCESS
currentNode
.
value
.
attributes
.
rejectHandler
.
type
=
RejectHandlerType
.
FINISH_PROCESS
const
approveMethod
=
currentNode
.
value
.
attributes
?.
approveMethod
const
approveMethod
=
currentNode
.
value
.
attributes
?.
approveMethod
if
(
approveMethod
===
ApproveMethodType
.
APPROVE_BY_RATIO
)
{
if
(
approveMethod
===
ApproveMethodType
.
APPROVE_BY_RATIO
)
{
currentNode
.
value
.
attributes
.
approveRatio
=
100
;
currentNode
.
value
.
attributes
.
approveRatio
=
100
}
}
}
}
// 默认 6小时
// 默认 6小时
...
...
src/components/SimpleProcessDesignerV2/src/utils.ts
View file @
58fc91b8
// 获取条件节点默认的名称
// 获取条件节点默认的名称
export
const
getDefaultConditionNodeName
=
(
index
:
number
,
defaultFlow
:
boolean
)
:
string
=>
{
export
const
getDefaultConditionNodeName
=
(
index
:
number
,
defaultFlow
:
boolean
)
:
string
=>
{
if
(
defaultFlow
)
{
if
(
defaultFlow
)
{
return
"其它情况"
return
'其它情况'
}
}
return
'条件'
+
(
index
+
1
)
return
'条件'
+
(
index
+
1
)
}
}
// 获得默认的表单字段权限.
// 获得默认的表单字段权限.
export
const
getDefaultFieldsPermission
=
(
formFields
:
string
[]
|
undefined
)
=>
{
export
const
getDefaultFieldsPermission
=
(
formFields
:
string
[]
|
undefined
)
=>
{
const
defaultFieldsPermission
:
any
[]
=
[];
const
defaultFieldsPermission
:
any
[]
=
[]
if
(
formFields
)
{
if
(
formFields
)
{
formFields
.
forEach
((
fieldStr
:
string
)
=>
{
formFields
.
forEach
((
fieldStr
:
string
)
=>
{
const
{
field
,
title
}
=
JSON
.
parse
(
fieldStr
)
const
{
field
,
title
}
=
JSON
.
parse
(
fieldStr
)
defaultFieldsPermission
.
push
({
defaultFieldsPermission
.
push
({
field
,
field
,
title
,
title
,
permission
:
'
2
'
// 只读
permission
:
'
1
'
// 只读
})
})
})
})
}
}
return
defaultFieldsPermission
;
return
defaultFieldsPermission
}
}
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