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
Unverified
Commit
e6765b7e
authored
Jan 20, 2025
by
芋道源码
Committed by
Gitee
Jan 20, 2025
Browse files
Options
Browse Files
Download
Plain Diff
!670 BPM-更多设置-流程编码
Merge pull request !670 from Lesan/feature/bpm-流程编码
parents
22eb2ccd
5efdd937
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
133 additions
and
5 deletions
+133
-5
src/views/bpm/model/form/ExtraSettings.vue
+121
-3
src/views/bpm/model/form/index.vue
+12
-2
No files found.
src/views/bpm/model/form/ExtraSettings.vue
View file @
e6765b7e
...
@@ -4,14 +4,132 @@
...
@@ -4,14 +4,132 @@
<template
#
label
>
<template
#
label
>
<el-text
size=
"large"
tag=
"b"
>
提交人权限
</el-text>
<el-text
size=
"large"
tag=
"b"
>
提交人权限
</el-text>
</
template
>
</
template
>
<el-checkbox
v-model=
"modelData.allowCancelRunningProcess"
label=
"允许撤销审批中的申请"
/>
<div
class=
"flex flex-col"
>
<div
class=
"ml-22px"
>
<el-checkbox
v-model=
"modelData.allowCancelRunningProcess"
label=
"允许撤销审批中的申请"
/>
<el-text
type=
"info"
>
第一个审批节点通过后,提交人仍可撤销申请
</el-text>
<div
class=
"ml-22px"
>
<el-text
type=
"info"
>
第一个审批节点通过后,提交人仍可撤销申请
</el-text>
</div>
</div>
</el-form-item>
<el-form-item
v-if=
"modelData.processIdRule"
class=
"mb-20px"
>
<
template
#
label
>
<el-text
size=
"large"
tag=
"b"
>
流程编码
</el-text>
</
template
>
<div
class=
"flex flex-col"
>
<div>
<el-input
v-model=
"modelData.processIdRule.prefix"
class=
"w-130px!"
placeholder=
"前缀"
:disabled=
"!modelData.processIdRule.enable"
>
<
template
#
prepend
>
<el-checkbox
v-model=
"modelData.processIdRule.enable"
/>
</
template
>
</el-input>
<el-select
v-model=
"modelData.processIdRule.infix"
class=
"w-130px! ml-5px"
placeholder=
"中缀"
:disabled=
"!modelData.processIdRule.enable"
>
<el-option
v-for=
"item in timeOptions"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
<el-input
v-model=
"modelData.processIdRule.postfix"
class=
"w-80px! ml-5px"
placeholder=
"后缀"
:disabled=
"!modelData.processIdRule.enable"
/>
<el-input-number
v-model=
"modelData.processIdRule.length"
class=
"w-120px! ml-5px"
:min=
"5"
:disabled=
"!modelData.processIdRule.enable"
/>
</div>
<div
class=
"ml-22px"
v-if=
"modelData.processIdRule.enable"
>
<el-text
type=
"info"
>
编码示例:{{ numberExample }}
</el-text>
</div>
</div>
</div>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</template>
</template>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
dayjs
from
'dayjs'
const
modelData
=
defineModel
<
any
>
()
const
modelData
=
defineModel
<
any
>
()
const
timeOptions
=
ref
([
{
value
:
'NULL'
,
label
:
'无'
},
{
value
:
'DAY'
,
label
:
'精确到日'
},
{
value
:
'HOUR'
,
label
:
'精确到时'
},
{
value
:
'MINUTE'
,
label
:
'精确到分'
},
{
value
:
'SECOND'
,
label
:
'精确到秒'
}
])
const
numberExample
=
computed
(()
=>
{
if
(
modelData
.
value
.
processIdRule
.
enable
)
{
let
infix
=
''
switch
(
modelData
.
value
.
processIdRule
.
infix
)
{
case
'DAY'
:
infix
=
dayjs
().
format
(
'YYYYMMDD'
)
break
case
'HOUR'
:
infix
=
dayjs
().
format
(
'YYYYMMDDHH'
)
break
case
'MINUTE'
:
infix
=
dayjs
().
format
(
'YYYYMMDDHHmm'
)
break
case
'SECOND'
:
infix
=
dayjs
().
format
(
'YYYYMMDDHHmmss'
)
break
default
:
break
}
return
(
modelData
.
value
.
processIdRule
.
prefix
+
infix
+
modelData
.
value
.
processIdRule
.
postfix
+
'1'
.
padStart
(
modelData
.
value
.
processIdRule
.
length
-
1
,
'0'
)
)
}
else
{
return
''
}
})
// 兼容以前未配置更多设置的流程
const
initData
=
()
=>
{
if
(
!
modelData
.
value
.
processIdRule
)
{
modelData
.
value
.
processIdRule
=
{
enable
:
false
,
prefix
:
''
,
infix
:
''
,
postfix
:
''
,
length
:
5
}
}
}
defineExpose
({
initData
})
</
script
>
</
script
>
src/views/bpm/model/form/index.vue
View file @
e6765b7e
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
<ProcessDesign
v-if=
"currentStep === 2"
v-model=
"formData"
ref=
"processDesignRef"
/>
<ProcessDesign
v-if=
"currentStep === 2"
v-model=
"formData"
ref=
"processDesignRef"
/>
<!-- 第四步:更多设置 -->
<!-- 第四步:更多设置 -->
<div
v-
if
=
"currentStep === 3"
class=
"mx-auto w-700px"
>
<div
v-
show
=
"currentStep === 3"
class=
"mx-auto w-700px"
>
<ExtraSettings
v-model=
"formData"
ref=
"extraSettingsRef"
/>
<ExtraSettings
v-model=
"formData"
ref=
"extraSettingsRef"
/>
</div>
</div>
</div>
</div>
...
@@ -103,6 +103,7 @@ const userStore = useUserStoreWithOut()
...
@@ -103,6 +103,7 @@ const userStore = useUserStoreWithOut()
const
basicInfoRef
=
ref
()
const
basicInfoRef
=
ref
()
const
formDesignRef
=
ref
()
const
formDesignRef
=
ref
()
const
processDesignRef
=
ref
()
const
processDesignRef
=
ref
()
const
extraSettingsRef
=
ref
()
/** 步骤校验函数 */
/** 步骤校验函数 */
const
validateBasic
=
async
()
=>
{
const
validateBasic
=
async
()
=>
{
...
@@ -145,7 +146,14 @@ const formData: any = ref({
...
@@ -145,7 +146,14 @@ const formData: any = ref({
startUserType
:
undefined
,
startUserType
:
undefined
,
startUserIds
:
[],
startUserIds
:
[],
managerUserIds
:
[],
managerUserIds
:
[],
allowCancelRunningProcess
:
true
allowCancelRunningProcess
:
true
,
processIdRule
:
{
enable
:
false
,
prefix
:
''
,
infix
:
''
,
postfix
:
''
,
length
:
5
}
})
})
//流程数据
//流程数据
...
@@ -187,6 +195,8 @@ const initData = async () => {
...
@@ -187,6 +195,8 @@ const initData = async () => {
// 最终,设置 currentStep 切换到第一步
// 最终,设置 currentStep 切换到第一步
currentStep
.
value
=
0
currentStep
.
value
=
0
extraSettingsRef
.
value
.
initData
()
}
}
/** 根据类型切换流程数据 */
/** 根据类型切换流程数据 */
...
...
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