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
192453e4
authored
Mar 01, 2025
by
芋道源码
Committed by
Gitee
Mar 01, 2025
Browse files
Options
Browse Files
Download
Plain Diff
!717 feat: bpm流程表单复制功能
Merge pull request !717 from Roan123/feature/bpm-form-copy
parents
7993c32f
f92ab64f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
7 deletions
+26
-7
src/views/bpm/form/editor/index.vue
+10
-0
src/views/bpm/form/index.vue
+16
-7
No files found.
src/views/bpm/form/editor/index.vue
View file @
192453e4
...
...
@@ -50,11 +50,13 @@ import FcDesigner from '@form-create/designer'
import
{
encodeConf
,
encodeFields
,
setConfAndFields
}
from
'@/utils/formCreate'
import
{
useTagsViewStore
}
from
'@/store/modules/tagsView'
import
{
useFormCreateDesigner
}
from
'@/components/FormCreate'
import
{
useRoute
}
from
'vue-router'
defineOptions
({
name
:
'BpmFormEditor'
})
const
{
t
}
=
useI18n
()
// 国际化
const
message
=
useMessage
()
// 消息
const
route
=
useRoute
()
// 路由
const
{
push
,
currentRoute
}
=
useRouter
()
// 路由
const
{
query
}
=
useRoute
()
// 路由信息
const
{
delView
}
=
useTagsViewStore
()
// 视图操作
...
...
@@ -150,6 +152,14 @@ onMounted(async () => {
const
data
=
await
FormApi
.
getForm
(
id
)
formData
.
value
=
data
setConfAndFields
(
designer
,
data
.
conf
,
data
.
fields
)
if
(
route
.
query
.
type
!==
'copy'
)
{
return
}
// 场景三: 复制表单
const
{
id
:
foo
,
...
copied
}
=
data
formData
.
value
=
copied
formData
.
value
.
name
+=
'_copy'
})
</
script
>
...
...
src/views/bpm/form/index.vue
View file @
192453e4
...
...
@@ -59,7 +59,15 @@
v-hasPermi=
"['bpm:form:update']"
link
type=
"primary"
@
click=
"openForm(scope.row.id)"
@
click=
"openForm('copy', scope.row.id)"
>
复制
</el-button>
<el-button
v-hasPermi=
"['bpm:form:update']"
link
type=
"primary"
@
click=
"openForm('update', scope.row.id)"
>
编辑
</el-button>
...
...
@@ -139,16 +147,17 @@ const resetQuery = () => {
}
/** 添加/修改操作 */
const
openForm
=
(
id
?:
number
)
=>
{
const
toRouter
:
{
name
:
string
;
query
?:
{
id
:
number
}
}
=
{
name
:
'BpmFormEditor'
const
openForm
=
(
type
:
string
,
id
?:
number
)
=>
{
const
toRouter
:
{
name
:
string
;
query
:
{
type
:
string
;
id
?:
number
}
}
=
{
name
:
'BpmFormEditor'
,
query
:
{
type
}
}
console
.
log
(
typeof
id
)
// 表单新建的时候id传的是event需要排除
if
(
typeof
id
===
'number'
||
typeof
id
===
'string'
)
{
toRouter
.
query
=
{
id
}
toRouter
.
query
.
id
=
id
}
push
(
toRouter
)
}
...
...
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