Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
ferry_web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jianan
ferry_web
Commits
4667f18b
Commit
4667f18b
authored
Feb 19, 2021
by
Mr. Lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加模版及流程的克隆功能。
parent
0420ffdd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
76 additions
and
4 deletions
+76
-4
src/api/process/admin/process.js
+8
-0
src/api/process/admin/template.js
+8
-0
src/views/process/admin/process-manager.vue
+29
-1
src/views/process/admin/template-manager.vue
+31
-3
No files found.
src/api/process/admin/process.js
View file @
4667f18b
...
...
@@ -53,3 +53,11 @@ export function classifyProcessList(params) {
params
})
}
// 克隆流程
export
function
cloneProcess
(
id
)
{
return
request
({
url
:
`/api/v1/process/clone/
${
id
}
`
,
method
:
'post'
})
}
src/api/process/admin/template.js
View file @
4667f18b
...
...
@@ -44,3 +44,11 @@ export function deleteTemplate(params) {
params
})
}
// 克隆模版
export
function
cloneTemplate
(
id
)
{
return
request
({
url
:
`/api/v1/tpl/clone/
${
id
}
`
,
method
:
'post'
})
}
src/views/process/admin/process-manager.vue
View file @
4667f18b
...
...
@@ -59,6 +59,13 @@
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<template
slot-scope=
"scope"
>
<el-button
v-permisaction=
"['process:admin:manager:clone']"
size=
"mini"
type=
"text"
icon=
"el-icon-receiving"
@
click=
"handleClone(scope.row)"
>
克隆
</el-button>
<el-button
v-permisaction=
"['process:admin:manager:edit']"
size=
"mini"
type=
"text"
...
...
@@ -191,7 +198,8 @@ import {
createProcess
,
updateProcess
,
processDetails
,
deleteProcess
deleteProcess
,
cloneProcess
}
from
'@/api/process/admin/process'
import
{
classifyList
}
from
'@/api/process/admin/classify'
...
...
@@ -497,6 +505,26 @@ export default {
}
else
{
this
.
ruleForm
.
form_structure
=
''
}
},
handleClone
(
row
)
{
this
.
$confirm
(
`确认克隆流程 <
${
row
.
name
}
> ?`
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'info'
}).
then
(()
=>
{
cloneProcess
(
row
.
id
).
then
(()
=>
{
this
.
getList
()
this
.
$message
({
type
:
'success'
,
message
:
'流程已克隆!'
})
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
})
})
}
}
}
...
...
src/views/process/admin/template-manager.vue
View file @
4667f18b
...
...
@@ -59,6 +59,13 @@
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<template
slot-scope=
"scope"
>
<el-button
v-permisaction=
"['process:admin:template:clone']"
size=
"mini"
type=
"text"
icon=
"el-icon-receiving"
@
click=
"handleClone(scope.row)"
>
克隆
</el-button>
<el-button
v-permisaction=
"['process:admin:template:edit']"
size=
"mini"
type=
"text"
...
...
@@ -128,7 +135,8 @@ import {
createTemplate
,
templateDetails
,
editTemplate
,
deleteTemplate
deleteTemplate
,
cloneTemplate
}
from
'@/api/process/admin/template'
// 表单设计
...
...
@@ -235,7 +243,7 @@ export default {
this
.
handleSave
(
this
.
$refs
.
makingform
.
getJSON
())
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
createTemplate
(
this
.
ruleForm
).
then
(
response
=>
{
createTemplate
(
this
.
ruleForm
).
then
(
()
=>
{
this
.
getList
()
this
.
open
=
false
})
...
...
@@ -246,7 +254,7 @@ export default {
this
.
handleSave
(
this
.
$refs
.
makingform
.
getJSON
())
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
editTemplate
(
this
.
ruleForm
).
then
(
response
=>
{
editTemplate
(
this
.
ruleForm
).
then
(
()
=>
{
this
.
getList
()
this
.
open
=
false
})
...
...
@@ -289,6 +297,26 @@ export default {
}
else
{
this
.
ruleForm
.
form_structure
=
''
}
},
handleClone
(
row
)
{
this
.
$confirm
(
`确认克隆模版 <
${
row
.
name
}
> ?`
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'info'
}).
then
(()
=>
{
cloneTemplate
(
row
.
id
).
then
(()
=>
{
this
.
getList
()
this
.
$message
({
type
:
'success'
,
message
:
'模版已克隆!'
})
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
})
})
}
}
}
...
...
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