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
627b822f
authored
Mar 27, 2024
by
jason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
仿钉钉设计流程后端接入-10%
parent
cf28e42a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
51 additions
and
14 deletions
+51
-14
src/api/bpm/simple/index.ts
+10
-0
src/components/SimpleProcessDesigner/src/addNode.vue
+4
-3
src/components/SimpleProcessDesigner/src/drawer/approverDrawer.vue
+1
-1
src/components/SimpleProcessDesigner/src/nodeWrap.vue
+2
-1
src/views/bpm/model/index.vue
+2
-2
src/views/bpm/simpleWorkflow/index.vue
+32
-7
No files found.
src/api/bpm/simple/index.ts
0 → 100644
View file @
627b822f
import
request
from
'@/config/axios'
export
const
saveBpmSimpleModel
=
async
(
data
)
=>
{
return
await
request
.
post
({
url
:
'/bpm/simple/save'
,
data
:
data
})
}
\ No newline at end of file
src/components/SimpleProcessDesigner/src/addNode.vue
View file @
627b822f
...
...
@@ -10,6 +10,7 @@
</div>
<p>
审批人
</p>
</a>
<!-- TODO 暂时去掉未完成
<a
class=
"add-node-popover-item notifier"
@
click=
"addType(2)"
>
<div
class=
"item-wrapper"
>
<span
class=
"iconfont"
>
</span>
...
...
@@ -22,6 +23,7 @@
</div>
<p>
条件分支
</p>
</a>
-->
</div>
<template
#
reference
>
<button
class=
"btn"
type=
"button"
>
...
...
@@ -71,8 +73,7 @@ const addType = (type) => {
candidateStrategy
:
undefined
,
candidateParam
:
[]
},
childNode
:
props
.
childNodeP
,
nodeUserList
:
[]
// childNode: props.childNodeP
}
}
else
if
(
type
==
2
)
{
data
=
{
...
...
@@ -97,7 +98,7 @@ const addType = (type) => {
priorityLevel
:
1
,
conditionList
:
[],
nodeUserList
:
[],
childNode
:
props
.
childNodeP
//
childNode: props.childNodeP
},
{
name
:
'条件2'
,
...
...
src/components/SimpleProcessDesigner/src/drawer/approverDrawer.vue
View file @
627b822f
...
...
@@ -250,7 +250,7 @@ const saveApprover = () => {
closeDrawer
()
}
const
saveConfig
=
()
=>
{
console
.
log
(
'before userTaskConfig is '
,
userTaskConfig
.
value
.
id
)
const
rawConfig
=
toRaw
(
userTaskConfig
.
value
)
rawConfig
.
value
.
attributes
=
toRaw
(
candidateConfig
.
value
)
rawConfig
.
flag
=
true
...
...
src/components/SimpleProcessDesigner/src/nodeWrap.vue
View file @
627b822f
...
...
@@ -295,7 +295,8 @@ const setPerson = (priorityLevel) => {
}
setUserTaskConfig
({
value
:
{
...
JSON
.
parse
(
JSON
.
stringify
(
props
.
nodeConfig
))
...
JSON
.
parse
(
JSON
.
stringify
(
props
.
nodeConfig
)),
id
:
'Activity_'
+
_uid
,
},
flag
:
false
,
id
:
_uid
,
...
...
src/views/bpm/model/index.vue
View file @
627b822f
...
...
@@ -74,7 +74,7 @@
</el-table-column>
<el-table-column
label=
"流程图标"
align=
"center"
prop=
"icon"
width=
"100"
>
<
template
#
default=
"scope"
>
<el-image
:src=
"scope.row.icon"
class=
"
w-32px h
-32px"
/>
<el-image
:src=
"scope.row.icon"
class=
"
h-32px w
-32px"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"流程分类"
align=
"center"
prop=
"categoryName"
width=
"100"
/>
...
...
@@ -165,7 +165,7 @@
<el-button
link
type=
"primary"
@
click=
"handleSimpleDesign(scope.row
.id
)"
@
click=
"handleSimpleDesign(scope.row)"
v-hasPermi=
"['bpm:model:update']"
>
仿钉钉设计流程
...
...
src/views/bpm/simpleWorkflow/index.vue
View file @
627b822f
...
...
@@ -5,7 +5,7 @@
<el-row>
<el-col
:span=
"20"
/>
<el-col
:span=
"4"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"test"
>
测试
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"test"
>
保存(用于测试,还未完成)
</el-button>
</el-col>
</el-row>
<div
class=
"box-scale"
>
...
...
@@ -23,20 +23,45 @@
import
nodeWrap
from
'@/components/SimpleProcessDesigner/src/nodeWrap.vue'
import
approverDrawer
from
'@/components/SimpleProcessDesigner/src/drawer/approverDrawer.vue'
import
{
ref
}
from
'vue'
import
{
saveBpmSimpleModel
}
from
'@/api/bpm/simple'
defineOptions
({
name
:
'SimpleWorkflowDesignEditor'
})
const
uid
=
getCurrentInstance
().
uid
;
const
router
=
useRouter
()
// 路由
const
{
query
}
=
useRoute
()
// 路由的查询
const
modelId
=
query
.
modelId
;
const
message
=
useMessage
()
// 国际化
const
nodeConfig
=
ref
({
name
:
'发起人'
,
type
:
0
,
id
:
'root'
,
nodeUserList
:
[],
id
:
'Activity_'
+
uid
,
attributes
:
{
"candidateStrategy"
:
70
"candidateStrategy"
:
'70'
},
childNode
:
{},
childNode
:
undefined
})
const
test
=
()
=>
{
console
.
log
(
'json format'
,
toRaw
(
nodeConfig
.
value
))
const
test
=
async
()
=>
{
if
(
!
modelId
)
{
message
.
error
(
'缺少模型 modelId 编号'
)
return
}
const
data
=
{
modelId
:
modelId
,
simpleModelBody
:
toRaw
(
nodeConfig
.
value
)
}
console
.
log
(
'request json data is '
,
data
)
const
result
=
await
saveBpmSimpleModel
(
data
);
console
.
log
(
'the result is '
,
result
)
if
(
result
){
message
.
success
(
'修改成功'
)
}
else
{
message
.
alert
(
'修改失败'
);
}
close
()
}
const
close
=
()
=>
{
router
.
push
({
path
:
'/bpm/manager/model'
})
}
</
script
>
<
style
>
@import
url('@/components/SimpleProcessDesigner/theme/workflow.css')
;
...
...
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