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
3478629f
Commit
3478629f
authored
Mar 21, 2020
by
张超
🎱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updateui
parent
ef3ff29e
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 @
3478629f
...
...
@@ -93,7 +93,10 @@ $dock-pin-width: 9px;
&
.hover
,
&
:hover
{
stroke
:
$--color-primary
;
stroke-dasharray
:
5
,
1
;
}
}
&
.contact
{
stroke
:
$--color-primary
;
}
}
.node
{
...
...
src/views/Editor/Views.vue
View file @
3478629f
...
...
@@ -28,7 +28,7 @@
ref=
"tree"
:data=
"views"
:props=
"defaultProps"
:expand-on-click-node=
"
fals
e"
:expand-on-click-node=
"
tru
e"
:default-expanded-keys=
"expandedKeys"
draggable
node-key=
"uuid"
...
...
@@ -43,6 +43,7 @@
>
<div
slot-scope=
"
{ node, data }" class="tree-node">
<div
class=
"node-name"
>
<i
v-show=
"Object.keys(iconMap).includes(data.type)"
:class=
"iconMap[data.type]"
style=
"color:#9b82e3"
></i>
{{
data
.
name
}}
</div>
...
...
@@ -91,7 +92,11 @@
authorization
:
'Bearer '
+
window
[
'zeroing_token'
],
},
expandedKeys
:
[],
nodeFilterPresets
:
this
.
$t
(
'nodeFilterPresets'
),
nodeFilterPresets
:
this
.
$t
(
'nodeFilterPresets'
),
iconMap
:
{
image
:
'el-icon-picture'
,
label
:
'el-icon-edit-outline'
}
};
},
mounted
()
{
...
...
@@ -217,6 +222,8 @@
* 点击左侧视图列表
*/
handleNodeClick
(
data
,
node
)
{
console
.
log
(
'handleNodeClick'
);
this
.
$store
.
dispatch
(
'activeComponent'
,
{
data
,
node
});
},
toAddView
()
{
...
...
src/views/Editor/behavior-editor/Board.vue
View file @
3478629f
...
...
@@ -286,7 +286,7 @@
prev
:
process
,
next
:
nextProcess
.
data
,
outputType
,
outputIndex
,
outputIndex
,
});
this
.
drawState
.
lineID
++
;
}
else
{
...
...
@@ -432,15 +432,46 @@
if
(
processNode
)
{
let
hint
=
'pn_'
+
process
.
uuid
===
key
;
processNode
.
setActive
(
hint
);
processNode
.
setActive
(
hint
);
if
(
hint
&&
this
.
selectedProcessNode
!==
processNode
)
{
// 相关联的线点亮
this
.
setContactLine
(
process
);
this
.
selectedProcessNode
=
processNode
;
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
)
{
this
.
$nextTick
(()
=>
{
...
...
src/views/Editor/behavior-editor/Board/LinkLine.vue
View file @
3478629f
<
template
>
<path
class=
"line
"
:d=
"transPath"
@
dblclick=
"onDblClick"
></path>
<path
:class=
"['line',
{'contact': onContact}]
" :d="transPath" @dblclick="onDblClick">
</path>
</
template
>
<
script
>
...
...
@@ -7,13 +7,16 @@
export
default
{
name
:
"LinkLine"
,
props
:
[
'data'
],
props
:
[
'data'
],
created
()
{
this
.
onContact
=
false
},
mounted
()
{
console
.
log
();
console
.
log
();
},
watch
:
{
'data'
:
function
(
v
)
{
this
.
onContact
=
v
.
onContact
;
}
},
computed
:
{
...
...
src/views/Editor/behavior-editor/Board/ProcessNode.vue
View file @
3478629f
...
...
@@ -59,6 +59,8 @@
@
mousedown=
"onPinDown"
></dock-pin>
</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>
</foreignObject>
</template>
...
...
yarn.lock
View file @
3478629f
...
...
@@ -6780,7 +6780,7 @@ promise-inflight@^1.0.1:
"props-compute@http://gitlab2.dui88.com/laoqifeng/props-compute.git":
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:
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