Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周远喜
mes-ui
Commits
22885b15
Commit
22885b15
authored
Oct 10, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mesplan/creator workflow/close
parent
e7c7f72e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
540 additions
and
501 deletions
+540
-501
index.vue
pages/mesPlan/index.vue
+18
-18
index.vue
pages/workflow/flow/index.vue
+522
-483
No files found.
pages/mesPlan/index.vue
View file @
22885b15
...
...
@@ -297,11 +297,11 @@ export default {
type
:
"date"
},
{
key
:
"creator
UserId
"
,
key
:
"creator"
,
title
:
this
.
$t
(
"creatorUserId"
),
align
:
"left"
,
high
:
true
,
type
:
"user"
//
type: "user"
},
{
key
:
"creationTime"
,
...
...
@@ -310,22 +310,22 @@ export default {
high
:
true
,
width
:
180
},
{
key
:
"lastModifierUserId"
,
title
:
this
.
$t
(
"lastModifierUserId"
),
hide
:
true
,
align
:
"left"
,
high
:
true
,
type
:
"user"
},
{
key
:
"lastModificationTime"
,
title
:
this
.
$t
(
"lastModificationTime"
),
hide
:
true
,
align
:
"center"
,
high
:
true
,
width
:
180
},
//
{
//
key: "lastModifierUserId",
//
title: this.$t("lastModifierUserId"),
//
hide: true,
//
align: "left",
//
high: true,
//
type: "user"
//
},
//
{
//
key: "lastModificationTime",
//
title: this.$t("lastModificationTime"),
//
hide: true,
//
align: "center",
//
high: true,
//
width: 180
//
},
{
title
:
"操作"
,
key
:
"action"
,
...
...
pages/workflow/flow/index.vue
View file @
22885b15
<
template
>
<div
id=
"flow"
>
<div
id=
"flow"
>
<div
id=
"myDiagramDiv"
class=
"flex fd"
>
<div
v-height=
"100"
class=
"flex"
>
<div
id=
"palette"
class=
"fg"
></div>
...
...
@@ -10,9 +10,9 @@
<div
id=
"draw"
class=
"fg"
></div>
</div>
<Modal
v-model=
"detailModal"
title=
"节点属性设置"
:width=
"800"
footer-hide
>
<component
:is=
"detail"
:eid=
"curId"
:data=
"node"
@
on-ok=
"ok
"
/>
<component
:is=
"detail"
:eid=
"curId"
:data=
"node"
@
on-ok=
"ok"
@
on-close=
"close
"
/>
</Modal>
</div>
</div>
</
template
>
<
script
>
...
...
@@ -107,20 +107,19 @@ export default {
width
:
horizontal
?
NaN
:
8
,
// if not stretching horizontally, just 8 wide
height
:
!
horizontal
?
NaN
:
8
,
// if not stretching vertically, just 8 tall
alignment
:
align
,
// align the port on the main Shape
stretch
:
horizontal
?
go
.
GraphObject
.
Horizontal
:
go
.
GraphObject
.
Vertical
,
stretch
:
horizontal
?
go
.
GraphObject
.
Horizontal
:
go
.
GraphObject
.
Vertical
,
portId
:
name
,
// declare this object to be a "port"
fromSpot
:
spot
,
// declare where links may connect at this port
fromLinkable
:
output
,
// declare whether the user may draw links from here
toSpot
:
spot
,
// declare where links may connect at this port
toLinkable
:
input
,
// declare whether the user may draw links to here
cursor
:
"pointer"
,
// show a different cursor to indicate potential link point
mouseEnter
:
function
(
e
,
port
)
{
mouseEnter
:
function
(
e
,
port
)
{
// the PORT argument will be this Shape
if
(
!
e
.
diagram
.
isReadOnly
)
port
.
fill
=
"rgba(15,0,25,0.5)"
;
},
mouseLeave
:
function
(
e
,
port
)
{
mouseLeave
:
function
(
e
,
port
)
{
port
.
fill
=
"transparent"
;
// port.fill = "white";
}
...
...
@@ -145,8 +144,7 @@ export default {
// the main object is a Panel that surrounds a TextBlock with a rectangular Shape
$
(
go
.
Panel
,
"Auto"
,
{
"Auto"
,
{
// resizable: true,
doubleClick
:
(
e
,
obj
)
=>
{
this
.
show
(
obj
.
part
.
data
);
...
...
@@ -154,8 +152,7 @@ export default {
},
$
(
go
.
Shape
,
"Rectangle"
,
{
"Rectangle"
,
{
fill
:
"white"
,
stroke
:
theme
,
strokeWidth
:
2
,
...
...
@@ -166,8 +163,7 @@ export default {
),
$
(
go
.
TextBlock
,
textStyle
(
theme
),
{
textStyle
(
theme
),
{
margin
:
8
,
maxSize
:
new
go
.
Size
(
300
,
NaN
),
wrap
:
go
.
TextBlock
.
WrapFit
,
...
...
@@ -196,14 +192,16 @@ export default {
"Auto"
,
$
(
go
.
Shape
,
"Diamond"
,
{
fill
:
"#fff"
,
stroke
:
theme
,
strokeWidth
:
2
},
"Diamond"
,
{
fill
:
"#fff"
,
stroke
:
theme
,
strokeWidth
:
2
},
new
go
.
Binding
(
"figure"
,
"figure"
)
),
$
(
go
.
TextBlock
,
textStyle
(
theme
),
{
textStyle
(
theme
),
{
margin
:
8
,
maxSize
:
new
go
.
Size
(
60
,
NaN
),
wrap
:
go
.
TextBlock
.
WrapFit
,
...
...
@@ -267,7 +265,7 @@ export default {
makePort
(
"R"
,
go
.
Spot
.
Right
,
go
.
Spot
.
Right
,
false
,
true
)
)
);
go
.
Shape
.
defineFigureGenerator
(
"File"
,
function
(
shape
,
w
,
h
)
{
go
.
Shape
.
defineFigureGenerator
(
"File"
,
function
(
shape
,
w
,
h
)
{
var
geo
=
new
go
.
Geometry
();
var
fig
=
new
go
.
PathFigure
(
0
,
0
,
true
);
// starting point
geo
.
add
(
fig
);
...
...
@@ -297,8 +295,7 @@ export default {
}),
$
(
go
.
TextBlock
,
textStyle
(
theme
),
{
textStyle
(
theme
),
{
margin
:
8
,
maxSize
:
new
go
.
Size
(
200
,
NaN
),
wrap
:
go
.
TextBlock
.
WrapFit
,
...
...
@@ -325,10 +322,10 @@ export default {
resegmentable
:
true
,
// mouse-overs subtly highlight links:
mouseEnter
:
function
(
e
,
link
)
{
mouseEnter
:
function
(
e
,
link
)
{
link
.
findObject
(
"HIGHLIGHT"
).
stroke
=
"rgba(30,144,255,0.2)"
;
},
mouseLeave
:
function
(
e
,
link
)
{
mouseLeave
:
function
(
e
,
link
)
{
link
.
findObject
(
"HIGHLIGHT"
).
stroke
=
"transparent"
;
},
selectionAdorned
:
false
...
...
@@ -346,18 +343,32 @@ export default {
),
$
(
go
.
Shape
,
// the link path shape
{
isPanelMain
:
true
,
stroke
:
theme
,
strokeWidth
:
2
},
new
go
.
Binding
(
"stroke"
,
"isSelected"
,
function
(
sel
)
{
{
isPanelMain
:
true
,
stroke
:
theme
,
strokeWidth
:
2
},
new
go
.
Binding
(
"stroke"
,
"isSelected"
,
function
(
sel
)
{
return
sel
?
"dodgerblue"
:
theme
;
}).
ofObject
()
),
$
(
go
.
Shape
,
// the "from" end arrowhead
{
fromArrow
:
"Circle"
,
fill
:
"#fff"
,
strokeWidth
:
2
,
stroke
:
theme
}
{
fromArrow
:
"Circle"
,
fill
:
"#fff"
,
strokeWidth
:
2
,
stroke
:
theme
}
),
$
(
go
.
Shape
,
// the arrowhead
{
toArrow
:
"standard"
,
strokeWidth
:
2
,
fill
:
theme
,
stroke
:
theme
}
{
toArrow
:
"standard"
,
strokeWidth
:
2
,
fill
:
theme
,
stroke
:
theme
}
),
$
(
go
.
Panel
,
...
...
@@ -372,7 +383,10 @@ export default {
$
(
go
.
Shape
,
"RoundedRectangle"
,
// the label shape
{
fill
:
"#F8F8F8"
,
strokeWidth
:
0
}
{
fill
:
"#F8F8F8"
,
strokeWidth
:
0
}
),
$
(
go
.
TextBlock
,
...
...
@@ -387,6 +401,7 @@ export default {
)
)
);
function
showLinkLabel
(
e
)
{
var
label
=
e
.
subject
.
findObject
(
"LABEL"
);
if
(
label
!==
null
)
...
...
@@ -408,11 +423,25 @@ export default {
nodeSelectionAdornmentTemplate
:
select
,
model
:
new
go
.
GraphLinksModel
([
// specify the contents of the Palette
{
category
:
"Start"
,
text
:
"开始"
},
{
text
:
"节点"
},
{
category
:
"Conditional"
,
text
:
"条件"
},
{
category
:
"End"
,
text
:
"结束"
},
{
category
:
"Comment"
,
text
:
"备注"
}
{
category
:
"Start"
,
text
:
"开始"
},
{
text
:
"节点"
},
{
category
:
"Conditional"
,
text
:
"条件"
},
{
category
:
"End"
,
text
:
"结束"
},
{
category
:
"Comment"
,
text
:
"备注"
}
])
}
);
...
...
@@ -422,7 +451,7 @@ export default {
var
txn
=
evt
.
object
;
// a Transaction
if
(
txn
===
null
)
return
;
// iterate over all of the actual ChangedEvents of the Transaction
txn
.
changes
.
each
(
function
(
e
)
{
txn
.
changes
.
each
(
function
(
e
)
{
// ignore any kind of change other than adding/removing a node
if
(
e
.
modelChange
!==
"nodeDataArray"
)
return
;
// record node insertions and removals
...
...
@@ -437,6 +466,7 @@ export default {
}
});
});
function
animateFadeDown
(
e
)
{
var
diagram
=
e
.
diagram
;
var
animation
=
new
go
.
Animation
();
...
...
@@ -456,7 +486,9 @@ export default {
// this.load();
},
load
()
{
Api
.
get
(
`
${
workflowUrl
}
/schema/get`
,
{
id
:
this
.
eid
}).
then
(
r
=>
{
Api
.
get
(
`
${
workflowUrl
}
/schema/get`
,
{
id
:
this
.
eid
}).
then
(
r
=>
{
console
.
warn
(
r
);
// this.myDiagram.model=go.Model.fromJson(r.content);
var
data
=
r
.
result
.
content
||
`{}`
;
...
...
@@ -498,6 +530,11 @@ export default {
this
.
detailModal
=
false
;
this
.
detail
=
null
;
this
.
curId
=
-
1
;
},
close
()
{
this
.
detailModal
=
false
;
this
.
detail
=
null
;
this
.
curId
=
-
1
;
}
}
};
...
...
@@ -508,9 +545,11 @@ export default {
// background:#a7a7a7;
margin: -16px;
padding: 0 10px;
canvas:focus {
outline: 0;
}
#myDiagramDiv {
height: calc(100vh - 51px);
display: flex;
...
...
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