Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
smart
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
wangqinghua
smart
Commits
205fa6a5
Commit
205fa6a5
authored
Sep 10, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
7f51ad2d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
6 deletions
+17
-6
app.route.ts
src/main/webapp/app/app.route.ts
+6
-0
mine.component.html
src/main/webapp/app/mine/mine.component.html
+2
-2
mine.component.ts
src/main/webapp/app/mine/mine.component.ts
+9
-4
No files found.
src/main/webapp/app/app.route.ts
View file @
205fa6a5
...
@@ -48,6 +48,9 @@ import {ServerComponent} from './overAll/modal/server/server.component';
...
@@ -48,6 +48,9 @@ import {ServerComponent} from './overAll/modal/server/server.component';
import
{
SwitchComponent
}
from
'./overAll/modal/switch/switch.component'
;
import
{
SwitchComponent
}
from
'./overAll/modal/switch/switch.component'
;
import
{
MineComponent
}
from
'./mine/mine.component'
;
import
{
MineComponent
}
from
'./mine/mine.component'
;
import
{
CommentStmt
}
from
'@angular/compiler'
;
import
{
CommentStmt
}
from
'@angular/compiler'
;
import
{
CommonProblemComponent
}
from
'./knowladge/common-problem/common-problem.component'
;
import
{
InformationTechComponent
}
from
'./knowladge/information-tech/information-tech.component'
;
import
{
ManagementSystemComponent
}
from
'./knowladge/management-system/management-system.component'
;
export
const
route
:
Routes
=
[
export
const
route
:
Routes
=
[
{
path
:
''
,
redirectTo
:
'app/main/home'
,
pathMatch
:
'prefix'
},
//空路由定向
{
path
:
''
,
redirectTo
:
'app/main/home'
,
pathMatch
:
'prefix'
},
//空路由定向
...
@@ -101,6 +104,9 @@ export const route: Routes = [
...
@@ -101,6 +104,9 @@ export const route: Routes = [
{
path
:
'database'
,
component
:
DatabaseComponent
,
data
:
{
breadcrumb
:
'数据库'
},},
{
path
:
'database'
,
component
:
DatabaseComponent
,
data
:
{
breadcrumb
:
'数据库'
},},
{
path
:
'server'
,
component
:
ServerComponent
,
data
:
{
breadcrumb
:
'服务器'
},},
{
path
:
'server'
,
component
:
ServerComponent
,
data
:
{
breadcrumb
:
'服务器'
},},
{
path
:
'switch'
,
component
:
SwitchComponent
,
data
:
{
breadcrumb
:
'交换机'
},},
{
path
:
'switch'
,
component
:
SwitchComponent
,
data
:
{
breadcrumb
:
'交换机'
},},
{
path
:
'commonProblem'
,
component
:
CommonProblemComponent
,
data
:
{
breadcrumb
:
'常见问题'
},},
{
path
:
'informationTech'
,
component
:
InformationTechComponent
,
data
:
{
breadcrumb
:
'信息技术'
},},
{
path
:
'managementSystem'
,
component
:
ManagementSystemComponent
,
data
:
{
breadcrumb
:
'管理制度'
},},
{
path
:
'mine'
,
component
:
MineComponent
,
data
:
{
breadcrumb
:
'菜单栏'
},},
{
path
:
'mine'
,
component
:
MineComponent
,
data
:
{
breadcrumb
:
'菜单栏'
},},
]
]
},
},
...
...
src/main/webapp/app/mine/mine.component.html
View file @
205fa6a5
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<nz-table
#
basicTable
[
nzData
]="
dataSet
"
[
nzFrontPagination
]="
true
"
>
<nz-table
#
basicTable
[
nzData
]="
dataSet
"
[
nzFrontPagination
]="
true
"
>
<thead>
<thead>
<tr>
<tr>
<th>
id
</th>
<th
nzWidth=
"25%"
>
id
</th>
<th>
名称
</th>
<th>
名称
</th>
<th>
父级ID
</th>
<th>
父级ID
</th>
<th>
code
</th>
<th>
code
</th>
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
</thead>
</thead>
<tbody>
<tbody>
<tr
*
ngFor=
"let data of basicTable.data"
>
<tr
*
ngFor=
"let data of basicTable.data"
>
<td>
<td
nzWidth=
"25%"
>
{{data.id}}
{{data.id}}
</td>
</td>
<td>
<td>
...
...
src/main/webapp/app/mine/mine.component.ts
View file @
205fa6a5
...
@@ -2,6 +2,7 @@ import {Component, OnInit} from '@angular/core';
...
@@ -2,6 +2,7 @@ import {Component, OnInit} from '@angular/core';
import
{
SystemService
}
from
'../system/system.service'
;
import
{
SystemService
}
from
'../system/system.service'
;
import
{
LocalStorageService
}
from
'ngx-webstorage'
;
import
{
LocalStorageService
}
from
'ngx-webstorage'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
import
{
UtilService
}
from
'../shared/common/util.service'
;
@
Component
({
@
Component
({
selector
:
'smart-mine'
,
selector
:
'smart-mine'
,
...
@@ -10,11 +11,11 @@ import {NzMessageService} from 'ng-zorro-antd';
...
@@ -10,11 +11,11 @@ import {NzMessageService} from 'ng-zorro-antd';
})
})
export
class
MineComponent
implements
OnInit
{
export
class
MineComponent
implements
OnInit
{
editCache
=
{}
;
editCache
=
[]
;
dataSet
=
[];
dataSet
=
[];
constructor
(
private
systemSer
:
SystemService
,
private
localStorage
:
LocalStorageService
,
constructor
(
private
systemSer
:
SystemService
,
private
localStorage
:
LocalStorageService
,
private
message
:
NzMessageService
)
{
private
message
:
NzMessageService
,
private
util
:
UtilService
)
{
}
}
ngOnInit
()
{
ngOnInit
()
{
...
@@ -51,16 +52,19 @@ export class MineComponent implements OnInit {
...
@@ -51,16 +52,19 @@ export class MineComponent implements OnInit {
}
}
add
()
{
add
()
{
this
.
dataSet
.
forEach
((
e
,
index
)
=>
e
.
key
=
index
+
1
);
const
item
=
{
const
item
=
{
id
:
this
.
util
.
generateUUID
(),
name
:
''
,
name
:
''
,
parentId
:
''
,
parentId
:
''
,
code
:
''
,
code
:
''
,
url
:
''
,
url
:
''
,
imageUrl
:
''
,
imageUrl
:
''
,
showOrder
:
''
,
showOrder
:
''
,
key
:
0
};
};
this
.
dataSet
=
[
item
,
...
this
.
dataSet
,
];
this
.
dataSet
=
[
item
,
...
this
.
dataSet
];
this
.
updateEditCache
(
0
)
;
this
.
editCache
=
[{
data
:
item
,
edit
:
true
},
...
this
.
editCache
]
;
console
.
log
(
this
.
dataSet
);
console
.
log
(
this
.
dataSet
);
console
.
log
(
this
.
editCache
);
console
.
log
(
this
.
editCache
);
}
}
...
@@ -77,6 +81,7 @@ export class MineComponent implements OnInit {
...
@@ -77,6 +81,7 @@ export class MineComponent implements OnInit {
const
index
=
this
.
dataSet
.
findIndex
(
item
=>
item
.
key
===
key
);
const
index
=
this
.
dataSet
.
findIndex
(
item
=>
item
.
key
===
key
);
this
.
dataSet
[
index
]
=
this
.
editCache
[
key
].
data
;
this
.
dataSet
[
index
]
=
this
.
editCache
[
key
].
data
;
this
.
editCache
[
key
].
edit
=
false
;
this
.
editCache
[
key
].
edit
=
false
;
console
.
log
(
this
.
dataSet
[
index
]);
this
.
systemSer
.
createMenu
(
this
.
dataSet
[
index
]).
subscribe
(
this
.
systemSer
.
createMenu
(
this
.
dataSet
[
index
]).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
message
.
success
(
'保存成功'
);
this
.
message
.
success
(
'保存成功'
);
...
...
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