Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
L
luna
Project
Project
Details
Activity
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
ops
luna
Commits
c2e693c7
Unverified
Commit
c2e693c7
authored
Jan 09, 2019
by
老广
Committed by
GitHub
Jan 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 支持直接登陆到 (#56)
parent
68f5b566
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
asset-tree.component.ts
src/app/elements/asset-tree/asset-tree.component.ts
+17
-1
No files found.
src/app/elements/asset-tree/asset-tree.component.ts
View file @
c2e693c7
...
...
@@ -4,6 +4,7 @@ import {AppService, LogService} from '../../app.service';
import
{
MAT_DIALOG_DATA
,
MatDialog
,
MatDialogRef
}
from
'@angular/material'
;
import
{
FormControl
,
Validators
}
from
'@angular/forms'
;
import
{
BehaviorSubject
}
from
'rxjs/BehaviorSubject'
;
import
{
Router
,
ActivatedRoute
,
Params
}
from
'@angular/router'
;
declare
var
$
:
any
;
...
...
@@ -54,7 +55,9 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges {
constructor
(
private
_appService
:
AppService
,
public
_dialog
:
MatDialog
,
public
_logger
:
LogService
)
{
public
_logger
:
LogService
,
private
activatedRoute
:
ActivatedRoute
,
)
{
this
.
searchEvt$
=
new
BehaviorSubject
<
string
>
(
this
.
query
);
}
...
...
@@ -69,6 +72,7 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges {
.
subscribe
((
n
)
=>
{
this
.
filter
();
});
}
ngOnChanges
(
changes
:
SimpleChanges
)
{
...
...
@@ -83,6 +87,18 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges {
draw
()
{
$
.
fn
.
zTree
.
init
(
$
(
'#ztree'
),
this
.
setting
,
this
.
Data
);
this
.
zTree
=
$
.
fn
.
zTree
.
getZTreeObj
(
'ztree'
);
this
.
activatedRoute
.
queryParams
.
subscribe
(
params
=>
{
const
login_to
=
params
[
'login_to'
];
if
(
login_to
)
{
this
.
Data
.
forEach
(
t
=>
{
if
(
login_to
===
t
.
id
&&
t
.
isParent
===
false
)
{
this
.
Connect
(
t
);
return
;
}
});
}
});
}
showRMenu
(
left
,
top
)
{
...
...
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