Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
任超
/
js.CadastralSystem
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
4a719e5f
authored
2021-01-25 19:32:46 +0800
by
杨威
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
流程跟踪模块开发
1 parent
16496a0d
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
143 additions
and
8 deletions
package.json
src/api/user.js
src/assets/images/arrow.jpg
src/views/zd/lcgz/flownode.vue
src/views/zd/lcgz/index.vue
package.json
View file @
4a719e5
...
...
@@ -37,6 +37,7 @@
"vue-router"
:
"^3.4.9"
,
"vuex"
:
"^3.6.0"
,
"webpack-theme-color-replacer"
:
"^1.3.14"
,
"x2js"
:
"^3.4.0"
,
"xlsx"
:
"^0.16.9"
},
"devDependencies"
:
{
...
...
src/api/user.js
View file @
4a719e5
...
...
@@ -78,4 +78,17 @@ export function templateLoad(data) {
method
:
'get'
,
})
}
/**
* 获取工作流大纲
*/
export
function
getProcessOutline
(
data
)
{
return
request
({
url
:
'/workflow/getProcessOutline'
,
method
:
'get'
,
params
:
{
processInstanceId
:
data
,
isCurrent
:
true
}
})
}
...
...
src/assets/images/arrow.jpg
0 → 100644
View file @
4a719e5
7.3 KB
src/views/zd/lcgz/flownode.vue
View file @
4a719e5
<
template
>
<div
class=
"flowBox"
>
<div
class=
"node"
v-for=
"node in flowData.Process.Nodes.ManualNode"
:key=
"node.id"
>
{{
node
.
name
}}
</div>
<div
class=
"node-wrap"
>
<div
class=
"node"
v-for=
"node in flowData.Nodes.ManualNode"
:key=
"node.id"
:class=
"[
{'wjh' : node.activityState == 1},
{'jh' : node.activityState == 2 },
{'gq' : node.activityState == 3 },
{'wc' : node.activityState == 4 },
{'zz' : node.activityState == 5 }
]"
>
{{
node
.
name
}}
</div>
</div>
</div>
</
template
>
...
...
@@ -12,7 +26,13 @@ export default {
flowData
:{
type
:
Object
,
default
:
null
}
},
flowState
:{
type
:
Array
,
default
:
()
=>
{
return
[];
},
},
},
data
(){
return
{
...
...
@@ -22,8 +42,8 @@ export default {
mounted
(){
this
.
$nextTick
(()
=>
{
console
.
log
(
this
.
flowData
,
'flowData.Nodes'
);
console
.
log
(
this
.
flowState
,
'flowState'
);
})
},
methods
:{},
computed
:
{},
...
...
@@ -34,6 +54,7 @@ export default {
.flowBox
{
width
:
150%
;
height
:
100%
;
position
:
relative
;
//
网格背景
background-image
:
-webkit-gradient
(
linear
,
...
...
@@ -50,5 +71,48 @@ export default {
),
linear-gradient
(
rgba
(
0
,
0
,
0
,
0.15
)
10%
,
rgba
(
0
,
0
,
0
,
0
)
10%
);
background-size
:
10px
10px
;
.node-wrap{
position
:
absolute
;
top
:
50%
;
left
:
20px
;
.node{
display
:
inline-block
;
min-width
:
80px
;
line-height
:
30px
;
background-color
:
#A9A9A9
;
text-align
:
center
;
border-radius
:
6px
;
margin-right
:
50px
;
position
:
relative
;
color
:
#ffffff
;
}
.node
::after
{
content
:
""
;
position
:
absolute
;
width
:
50px
;
height
:
30px
;
left
:
100%
;
background-image
:
url("../../../assets/images/arrow.jpg")
;
background-size
:
50px
30px
;
}
.node
:last-child:after
{
display
:
none
;
}
.wjh
{
background-color
:
#A9A9A9
;
}
.jh
{
background-color
:
#449D44
;
}
.gq
{
background-color
:
#F0AD4E
;
}
.wc
{
background-color
:
#5BC0DE
;
}
.zz
{
background-color
:
#F13F2F
;
}
}
}
</
style
>
\ No newline at end of file
...
...
src/views/zd/lcgz/index.vue
View file @
4a719e5
...
...
@@ -3,13 +3,20 @@
<div
class=
"flowContent"
>
<flowNode
:flowData=
"flowData"
></flowNode>
<flowNode
:flowData=
"flowData"
:flowState=
"flowState"
v-if=
"flowShow"
></flowNode>
<ul
class=
"legend"
>
<li><span
class=
"circle wjh"
></span><span
class=
"name"
>
未激活
</span></li>
<li><span
class=
"circle jh"
></span><span
class=
"name"
>
激活
</span></li>
<li><span
class=
"circle gq"
></span><span
class=
"name"
>
挂起
</span></li>
<li><span
class=
"circle wc"
></span><span
class=
"name"
>
完成
</span></li>
<li><span
class=
"circle zz"
></span><span
class=
"name"
>
终止
</span></li>
</ul>
</div>
</div>
</
template
>
<
script
>
import
{
getActivityDetail
,
templateLoad
}
from
"@api/user"
;
import
{
getActivityDetail
,
templateLoad
,
getProcessOutline
}
from
"@api/user"
;
import
flowNode
from
"./flownode"
export
default
{
name
:
""
,
...
...
@@ -19,6 +26,7 @@ export default {
return
{
flowData
:{},
flowShow
:
false
,
flowState
:[]
}
},
created
()
{},
...
...
@@ -34,9 +42,24 @@ export default {
}
getActivityDetail
(
params
).
then
((
res
)
=>
{
console
.
log
(
res
.
processInstance
.
templetId
);
templateLoad
(
res
.
processInstance
.
templetId
).
then
((
res
)
=>
{
console
.
log
(
this
.
$x2js
.
xml2js
(
res
));
this
.
flowData
=
this
.
$x2js
.
xml2js
(
res
);
templateLoad
(
res
.
processInstance
.
templetId
).
then
((
res1
)
=>
{
console
.
log
(
this
.
$x2js
.
xml2js
(
res1
).
Process
,
'Process'
);
getProcessOutline
(
res
.
processInstance
.
id
).
then
((
res2
)
=>
{
this
.
flowData
=
this
.
$x2js
.
xml2js
(
res1
).
Process
;
console
.
log
(
res2
.
activityOutlines
,
'res.activityOutlines'
);
this
.
flowState
=
res2
.
activityOutlines
;
this
.
$nextTick
(()
=>
{
this
.
flowData
.
Nodes
.
ManualNode
.
push
(
this
.
flowData
.
Nodes
.
EndNode
);
this
.
flowData
.
Nodes
.
ManualNode
.
unshift
(
this
.
flowData
.
Nodes
.
StartNode
);
// this.flowData.Nodes.StartNode.activityType = this.flowState.filter( i => i.activityTemplateId == this.flowData.Nodes.StartNode.id)[0].activityType;
// this.flowData.Nodes.EndNode.activityType = this.flowState.filter( i => i.activityTemplateId == this.flowData.Nodes.EndNode.id)[0].activityType;
this
.
flowData
.
Nodes
.
ManualNode
.
forEach
(
item
=>
{
item
.
activityState
=
this
.
flowState
.
filter
(
i
=>
i
.
activityTemplateId
==
item
.
id
)[
0
].
activityState
;
});
this
.
flowShow
=
true
;
})
})
.
catch
((
error
)
=>
{});
})
.
catch
((
error
)
=>
{});
})
...
...
@@ -49,11 +72,45 @@ export default {
</
script
>
<
style
scoped
lang=
"less"
>
.main
{
position
:
relative
;
.flowContent
{
width
:
calc
(
100%
+
6px
);
height
:
100%
;
position
:
relative
;
overflow-x
:
scroll
;
}
.legend
{
position
:
absolute
;
top
:
20px
;
right
:
20px
;
li{
margin-bottom
:
10px
;
.circle{
display
:
inline-block
;
width
:
12px
;
height
:
12px
;
border-radius
:
6px
;
}
.name
{
margin-left
:
10px
;
font-weight
:
bold
;
}
.wjh
{
background-color
:
#A9A9A9
;
}
.jh
{
background-color
:
#449D44
;
}
.gq
{
background-color
:
#F0AD4E
;
}
.wc
{
background-color
:
#5BC0DE
;
}
.zz
{
background-color
:
#F13F2F
;
}
}
}
}
</
style
>
...
...
Please
register
or
sign in
to post a comment