Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
875d18d0
Commit
875d18d0
authored
Aug 03, 2022
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工作流和抄送封装
parent
fd3591d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
93 additions
and
4 deletions
+93
-4
index.vue
src/components/WorkFlow/index.vue
+84
-0
index.vue
src/views/index.vue
+9
-4
No files found.
src/components/WorkFlow/index.vue
0 → 100644
View file @
875d18d0
<
template
>
<div>
<my-process-viewer
ref=
"processViewer"
:value=
"bpmnXML"
:prefix=
"prefix"
:activityData=
"activityData"
:processInstanceData=
"processInstanceData"
:taskData=
"taskData"
style=
"height:500px; margin-bottom:10px"
/>
<el-form
label-position=
"left"
label-width=
"100px"
>
<el-form-item
label=
"抄送"
>
<el-select
v-model=
"valueSync"
multiple
placeholder=
"请选择抄送人"
>
<el-option
v-for=
"item in users"
:key=
"item.id"
:label=
"item.nickname"
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
</div>
</
template
>
<
script
>
import
{
getProcessDefinitionBpmnXMLByKey
}
from
"
@/api/bpm/definition
"
import
{
listSimpleUsers
}
from
'
@/api/system/user
'
export
default
{
props
:{
xmlkey
:
String
,
// 流程标识
value
:
Array
,
prefix
:
{
// 使用哪个引擎
type
:
String
,
default
:
"
camunda
"
,
},
activityData
:
{
// 活动的数据。传递时,可高亮流程
type
:
Array
,
default
:
()
=>
[],
},
processInstanceData
:
{
// 流程实例的数据。传递时,可展示流程发起人等信息
type
:
Object
,
},
taskData
:
{
// 任务实例的数据。传递时,可展示 UserTask 审核相关的信息
type
:
Array
,
default
:
()
=>
[],
}
},
data
(){
return
{
valueSync
:
[],
bpmnXML
:
null
,
users
:
[],
selectedUserIds
:[]
}
},
watch
:{
value
(){
this
.
valueSync
=
this
.
value
||
[]
},
valueSync
(
val
){
this
.
$emit
(
'
input
'
,
val
)
},
},
created
(){
if
(
this
.
value
){
this
.
valueSync
=
this
.
value
}
listSimpleUsers
().
then
(
res
=>
{
this
.
users
=
res
.
data
})
this
.
loadData
()
},
methods
:{
loadData
(){
getProcessDefinitionBpmnXMLByKey
(
this
.
xmlkey
).
then
(
response
=>
{
this
.
bpmnXML
=
response
.
data
})
}
}
}
</
script
>
\ No newline at end of file
src/views/index.vue
View file @
875d18d0
...
@@ -10,7 +10,11 @@
...
@@ -10,7 +10,11 @@
<el-row>
<el-row>
<ueditor
/>
<ueditor
/>
</el-row>
</el-row>
<el-card
style=
"margin:20px 0"
>
<div
slot=
"header"
>
测试审批抄送
</div>
<work-flow
xmlkey=
"free_apply"
v-model=
"selectedUsers"
/>
<div>
选择的用户:
{{
selectedUsers
}}
</div>
</el-card>
<el-row>
<el-row>
<my-process-viewer
key=
"designer"
v-model=
"bpmnXML"
v-bind=
"bpmnControlForm"
/>
<my-process-viewer
key=
"designer"
v-model=
"bpmnXML"
v-bind=
"bpmnControlForm"
/>
</el-row>
</el-row>
...
@@ -49,7 +53,7 @@ import Ueditor from '@/components/Ueditor'
...
@@ -49,7 +53,7 @@ import Ueditor from '@/components/Ueditor'
import
{
import
{
getProcessDefinitionBpmnXMLByKey
getProcessDefinitionBpmnXMLByKey
}
from
"
@/api/bpm/definition
"
;
}
from
"
@/api/bpm/definition
"
;
import
WorkFlow
from
'
@/components/WorkFlow
'
const
lineChartData
=
{
const
lineChartData
=
{
newVisitis
:
{
newVisitis
:
{
expectedData
:
[
100
,
120
,
161
,
134
,
105
,
160
,
165
],
expectedData
:
[
100
,
120
,
161
,
134
,
105
,
160
,
165
],
...
@@ -77,12 +81,13 @@ export default {
...
@@ -77,12 +81,13 @@ export default {
RaddarChart
,
RaddarChart
,
PieChart
,
PieChart
,
BarChart
,
BarChart
,
Ueditor
Ueditor
,
WorkFlow
},
},
data
()
{
data
()
{
return
{
return
{
lineChartData
:
lineChartData
.
newVisitis
,
lineChartData
:
lineChartData
.
newVisitis
,
selectedUsers
:[],
// BPMN 数据
// BPMN 数据
bpmnXML
:
null
,
bpmnXML
:
null
,
bpmnControlForm
:
{
bpmnControlForm
:
{
...
...
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