Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-editor
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
劳工
zeroing-editor
Commits
34bbb913
Commit
34bbb913
authored
Mar 21, 2020
by
劳工
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'chao' into 'dev'
updateui See merge request
!10
parents
ef3ff29e
3478629f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
57 additions
and
11 deletions
+57
-11
behavior.scss
src/themes/light/behavior.scss
+4
-1
Views.vue
src/views/Editor/Views.vue
+9
-2
Board.vue
src/views/Editor/behavior-editor/Board.vue
+34
-3
LinkLine.vue
src/views/Editor/behavior-editor/Board/LinkLine.vue
+7
-4
ProcessNode.vue
src/views/Editor/behavior-editor/Board/ProcessNode.vue
+2
-0
yarn.lock
yarn.lock
+1
-1
No files found.
src/themes/light/behavior.scss
View file @
34bbb913
...
@@ -93,7 +93,10 @@ $dock-pin-width: 9px;
...
@@ -93,7 +93,10 @@ $dock-pin-width: 9px;
&
.hover
,
&
:hover
{
&
.hover
,
&
:hover
{
stroke
:
$--color-primary
;
stroke
:
$--color-primary
;
stroke-dasharray
:
5
,
1
;
stroke-dasharray
:
5
,
1
;
}
}
&
.contact
{
stroke
:
$--color-primary
;
}
}
}
.node
{
.node
{
...
...
src/views/Editor/Views.vue
View file @
34bbb913
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
ref=
"tree"
ref=
"tree"
:data=
"views"
:data=
"views"
:props=
"defaultProps"
:props=
"defaultProps"
:expand-on-click-node=
"
fals
e"
:expand-on-click-node=
"
tru
e"
:default-expanded-keys=
"expandedKeys"
:default-expanded-keys=
"expandedKeys"
draggable
draggable
node-key=
"uuid"
node-key=
"uuid"
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
>
>
<div
slot-scope=
"
{ node, data }" class="tree-node">
<div
slot-scope=
"
{ node, data }" class="tree-node">
<div
class=
"node-name"
>
<div
class=
"node-name"
>
<i
v-show=
"Object.keys(iconMap).includes(data.type)"
:class=
"iconMap[data.type]"
style=
"color:#9b82e3"
></i>
{{
data
.
name
}}
{{
data
.
name
}}
</div>
</div>
...
@@ -91,7 +92,11 @@
...
@@ -91,7 +92,11 @@
authorization
:
'Bearer '
+
window
[
'zeroing_token'
],
authorization
:
'Bearer '
+
window
[
'zeroing_token'
],
},
},
expandedKeys
:
[],
expandedKeys
:
[],
nodeFilterPresets
:
this
.
$t
(
'nodeFilterPresets'
),
nodeFilterPresets
:
this
.
$t
(
'nodeFilterPresets'
),
iconMap
:
{
image
:
'el-icon-picture'
,
label
:
'el-icon-edit-outline'
}
};
};
},
},
mounted
()
{
mounted
()
{
...
@@ -217,6 +222,8 @@
...
@@ -217,6 +222,8 @@
* 点击左侧视图列表
* 点击左侧视图列表
*/
*/
handleNodeClick
(
data
,
node
)
{
handleNodeClick
(
data
,
node
)
{
console
.
log
(
'handleNodeClick'
);
this
.
$store
.
dispatch
(
'activeComponent'
,
{
data
,
node
});
this
.
$store
.
dispatch
(
'activeComponent'
,
{
data
,
node
});
},
},
toAddView
()
{
toAddView
()
{
...
...
src/views/Editor/behavior-editor/Board.vue
View file @
34bbb913
...
@@ -286,7 +286,7 @@
...
@@ -286,7 +286,7 @@
prev
:
process
,
prev
:
process
,
next
:
nextProcess
.
data
,
next
:
nextProcess
.
data
,
outputType
,
outputType
,
outputIndex
,
outputIndex
,
});
});
this
.
drawState
.
lineID
++
;
this
.
drawState
.
lineID
++
;
}
else
{
}
else
{
...
@@ -432,15 +432,46 @@
...
@@ -432,15 +432,46 @@
if
(
processNode
)
{
if
(
processNode
)
{
let
hint
=
'pn_'
+
process
.
uuid
===
key
;
let
hint
=
'pn_'
+
process
.
uuid
===
key
;
processNode
.
setActive
(
hint
);
processNode
.
setActive
(
hint
);
if
(
hint
&&
this
.
selectedProcessNode
!==
processNode
)
{
if
(
hint
&&
this
.
selectedProcessNode
!==
processNode
)
{
// 相关联的线点亮
this
.
setContactLine
(
process
);
this
.
selectedProcessNode
=
processNode
;
this
.
selectedProcessNode
=
processNode
;
this
.
$emit
(
'select-process-node'
,
process
);
this
.
$emit
(
'select-process-node'
,
process
);
}
}
}
}
}
}
}
}
},
},
setContactLine
(
process
)
{
let
preArr
=
[];
let
_fetchNode
=
(
_uuid
,
type
)
=>
{
Object
.
keys
(
this
.
lines
).
filter
(
_sliceKey
=>
!
preArr
.
includes
(
_sliceKey
)).
map
(
key
=>
{
let
itemLine
=
this
.
lines
[
key
];
if
(
type
===
'pre'
)
{
if
(
itemLine
.
next
&&
itemLine
.
next
.
uuid
===
_uuid
)
{
preArr
.
push
(
key
)
if
(
itemLine
.
prev
&&
itemLine
.
prev
.
uuid
)
{
_fetchNode
(
itemLine
.
prev
.
uuid
,
'pre'
)
}
}
}
else
if
(
type
===
'next'
){
if
(
itemLine
.
prev
&&
itemLine
.
prev
.
uuid
===
_uuid
)
{
preArr
.
push
(
key
)
if
(
itemLine
.
next
&&
itemLine
.
next
.
uuid
)
{
_fetchNode
(
itemLine
.
next
.
uuid
,
'next'
)
}
}
}
})
}
_fetchNode
(
process
.
_data
.
uuid
,
'pre'
);
_fetchNode
(
process
.
_data
.
uuid
,
'next'
);
Object
.
keys
(
this
.
lines
).
map
(
key
=>
{
this
.
$set
(
this
.
lines
,
key
,
{
...
this
.
lines
[
key
],
onContact
:
preArr
.
includes
(
key
)})
})
},
updateProcessNode
(
metaID
)
{
updateProcessNode
(
metaID
)
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
...
...
src/views/Editor/behavior-editor/Board/LinkLine.vue
View file @
34bbb913
<
template
>
<
template
>
<path
class=
"line
"
:d=
"transPath"
@
dblclick=
"onDblClick"
></path>
<path
:class=
"['line',
{'contact': onContact}]
" :d="transPath" @dblclick="onDblClick">
</path>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -7,13 +7,16 @@
...
@@ -7,13 +7,16 @@
export
default
{
export
default
{
name
:
"LinkLine"
,
name
:
"LinkLine"
,
props
:
[
'data'
],
props
:
[
'data'
],
created
()
{
this
.
onContact
=
false
},
mounted
()
{
mounted
()
{
console
.
log
();
console
.
log
();
},
},
watch
:
{
watch
:
{
'data'
:
function
(
v
)
{
'data'
:
function
(
v
)
{
this
.
onContact
=
v
.
onContact
;
}
}
},
},
computed
:
{
computed
:
{
...
...
src/views/Editor/behavior-editor/Board/ProcessNode.vue
View file @
34bbb913
...
@@ -59,6 +59,8 @@
...
@@ -59,6 +59,8 @@
@
mousedown=
"onPinDown"
@
mousedown=
"onPinDown"
></dock-pin>
></dock-pin>
</div>
</div>
<!-- 判断是否有子节点 -->
<i
class=
"sub-mark el-icon-s-tools"
v-show=
"meta.sub && meta.from === 'custom' && Object.keys(meta.sub).length > 0"
style=
"color:#9b82e3;text-align: center;"
></i>
</div>
</div>
</foreignObject>
</foreignObject>
</template>
</template>
...
...
yarn.lock
View file @
34bbb913
...
@@ -6780,7 +6780,7 @@ promise-inflight@^1.0.1:
...
@@ -6780,7 +6780,7 @@ promise-inflight@^1.0.1:
"props-compute@http://gitlab2.dui88.com/laoqifeng/props-compute.git":
"props-compute@http://gitlab2.dui88.com/laoqifeng/props-compute.git":
version "1.0.0"
version "1.0.0"
resolved "http://gitlab2.dui88.com/laoqifeng/props-compute.git#
c676e9e12a06ccc3556101197171ee47e9ebdd3c
"
resolved "http://gitlab2.dui88.com/laoqifeng/props-compute.git#
9c6abcccf41f8d38d3a327716060f5e7722c7c1a
"
proxy-addr@~2.0.5:
proxy-addr@~2.0.5:
version "2.0.5"
version "2.0.5"
...
...
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