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
eb32b2d5
Commit
eb32b2d5
authored
Dec 18, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
workService
parent
f29656d6
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
575 additions
and
21 deletions
+575
-21
README.md
README.md
+1
-0
resource-alarm.component.html
...app/analysis/resource-alarm/resource-alarm.component.html
+3
-3
resource-alarm.component.ts
...p/app/analysis/resource-alarm/resource-alarm.component.ts
+7
-6
app.main.module.ts
src/main/webapp/app/app.main.module.ts
+4
-0
app.route.ts
src/main/webapp/app/app.route.ts
+2
-0
sidebar.component.html
src/main/webapp/app/layouts/sidebar/sidebar.component.html
+11
-7
sidebar.component.ts
src/main/webapp/app/layouts/sidebar/sidebar.component.ts
+247
-3
group.component.html
src/main/webapp/app/system/group/group.component.html
+2
-2
params-type.component.html
...app/app/work/modal/params-type/params-type.component.html
+12
-0
params-type.component.ts
...ebapp/app/work/modal/params-type/params-type.component.ts
+108
-0
type-asets.component.html
...ebapp/app/work/modal/type-asets/type-asets.component.html
+1
-0
pararms.component.html
src/main/webapp/app/work/pararms/pararms.component.html
+71
-0
pararms.component.ts
src/main/webapp/app/work/pararms/pararms.component.ts
+81
-0
work.service.ts
src/main/webapp/app/work/work.service.ts
+20
-0
documentation.css
src/main/webapp/content/css/documentation.css
+5
-0
No files found.
README.md
View file @
eb32b2d5
...
@@ -27,6 +27,7 @@ Module ng g module my-module
...
@@ -27,6 +27,7 @@ Module ng g module my-module
合同跟踪 contractTrack
合同跟踪 contractTrack
资产备件 assetPart
资产备件 assetPart
知识库 knowledgeBase
知识库 knowledgeBase
参数配置 parames
业务监管: business
业务监管: business
业务概览 overview
业务概览 overview
业务拓扑 bTopology
业务拓扑 bTopology
...
...
src/main/webapp/app/analysis/resource-alarm/resource-alarm.component.html
View file @
eb32b2d5
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<div
nz-col
nzSpan=
"3"
>
<div
nz-col
nzSpan=
"3"
>
<nz-select
style=
"width: 100%;"
nzPlaceHolder=
"所有分组"
[(
ngModel
)]="
obj
.
groupid
"
>
<nz-select
style=
"width: 100%;"
nzPlaceHolder=
"所有分组"
[(
ngModel
)]="
obj
.
groupid
"
>
<ng-container
*
ngFor=
"let item of groupList"
>
<ng-container
*
ngFor=
"let item of groupList"
>
<nz-option
nzLabel=
"{{item.name}}"
nzValue=
"{{item.groupid}}
"
></nz-option>
<nz-option
[
nzLabel
]="
item
.
name
"
[
nzValue
]="
item
.
groupid
"
></nz-option>
</ng-container>
</ng-container>
</nz-select>
</nz-select>
</div>
</div>
...
@@ -45,13 +45,13 @@
...
@@ -45,13 +45,13 @@
<div
nz-col
nzSpan=
"8"
*
ngIf=
"timeType == '5'"
>
<div
nz-col
nzSpan=
"8"
*
ngIf=
"timeType == '5'"
>
<nz-date-picker
<nz-date-picker
nzShowTime
nzShowTime
[(
ngModel
)]="
timeBegin
"
[(
ngModel
)]="
startTime
"
nzPlaceHolder=
"开始时间"
nzPlaceHolder=
"开始时间"
></nz-date-picker>
></nz-date-picker>
<nz-date-picker
<nz-date-picker
nzShowTime
nzShowTime
nzFormat=
"yyyy-MM-dd HH:mm:ss"
nzFormat=
"yyyy-MM-dd HH:mm:ss"
[(
ngModel
)]="
timeEnd
"
[(
ngModel
)]="
endTime
"
nzPlaceHolder=
"结束时间"
nzPlaceHolder=
"结束时间"
></nz-date-picker>
></nz-date-picker>
</div>
</div>
...
...
src/main/webapp/app/analysis/resource-alarm/resource-alarm.component.ts
View file @
eb32b2d5
...
@@ -29,7 +29,7 @@ export class ResourceAlarmComponent implements OnInit {
...
@@ -29,7 +29,7 @@ export class ResourceAlarmComponent implements OnInit {
chartTopOption
;
chartTopOption
;
charTrendOption
;
charTrendOption
;
commonList
commonList
;
reportList
;
reportList
;
pageCount
=
pageSize
;
pageCount
=
pageSize
;
...
@@ -68,6 +68,7 @@ export class ResourceAlarmComponent implements OnInit {
...
@@ -68,6 +68,7 @@ export class ResourceAlarmComponent implements OnInit {
//告警总数TOP10
//告警总数TOP10
getAlarmTopEchart
()
{
getAlarmTopEchart
()
{
console
.
log
(
this
.
obj
);
const
data
=
{
const
data
=
{
groupid
:
this
.
obj
.
groupid
,
groupid
:
this
.
obj
.
groupid
,
startTime
:
this
.
obj
.
startTime
,
startTime
:
this
.
obj
.
startTime
,
...
@@ -76,8 +77,8 @@ export class ResourceAlarmComponent implements OnInit {
...
@@ -76,8 +77,8 @@ export class ResourceAlarmComponent implements OnInit {
};
};
this
.
analysisSer
.
waringCountTop
(
data
).
subscribe
(
this
.
analysisSer
.
waringCountTop
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
const
data
=
res
.
data
;
const
response
=
res
.
data
;
this
.
setTopEcharts
(
data
);
this
.
setTopEcharts
(
response
);
}
}
);
);
}
}
...
@@ -113,8 +114,8 @@ export class ResourceAlarmComponent implements OnInit {
...
@@ -113,8 +114,8 @@ export class ResourceAlarmComponent implements OnInit {
};
};
this
.
analysisSer
.
waringTrend
(
data
).
subscribe
(
this
.
analysisSer
.
waringTrend
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
const
data
=
res
.
data
;
const
response
=
res
.
data
;
this
.
setAlarmTrend
(
data
);
this
.
setAlarmTrend
(
response
);
}
}
);
);
}
}
...
@@ -200,7 +201,7 @@ export class ResourceAlarmComponent implements OnInit {
...
@@ -200,7 +201,7 @@ export class ResourceAlarmComponent implements OnInit {
};
};
this
.
analysisSer
.
statisticalReport
(
data
).
subscribe
(
this
.
analysisSer
.
statisticalReport
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
reportList
=
res
.
data
;
this
.
reportList
=
res
.
data
.
data
;
}
}
);
);
}
}
...
...
src/main/webapp/app/app.main.module.ts
View file @
eb32b2d5
...
@@ -90,6 +90,8 @@ import {LinkInventoryComponent} from './work/modal/link-inventory/link-inventory
...
@@ -90,6 +90,8 @@ import {LinkInventoryComponent} from './work/modal/link-inventory/link-inventory
import
{
AnalysisDealComponent
}
from
'./analysis/operation-work/analysis-deal/analysis-deal.component'
;
import
{
AnalysisDealComponent
}
from
'./analysis/operation-work/analysis-deal/analysis-deal.component'
;
import
{
AnalysisEventComponent
}
from
'./analysis/operation-work/analysis-event/analysis-event.component'
;
import
{
AnalysisEventComponent
}
from
'./analysis/operation-work/analysis-event/analysis-event.component'
;
import
{
AnalysisStatusComponent
}
from
'./analysis/operation-work/analysis-status/analysis-status.component'
;
import
{
AnalysisStatusComponent
}
from
'./analysis/operation-work/analysis-status/analysis-status.component'
;
import
{
PararmsComponent
}
from
'./work/pararms/pararms.component'
;
import
{
ParamsTypeComponent
}
from
'./work/modal/params-type/params-type.component'
;
@
NgModule
({
@
NgModule
({
imports
:
[
imports
:
[
...
@@ -181,6 +183,8 @@ import {AnalysisStatusComponent} from './analysis/operation-work/analysis-status
...
@@ -181,6 +183,8 @@ import {AnalysisStatusComponent} from './analysis/operation-work/analysis-status
AnalysisDealComponent
,
AnalysisDealComponent
,
AnalysisEventComponent
,
AnalysisEventComponent
,
AnalysisStatusComponent
,
AnalysisStatusComponent
,
PararmsComponent
,
ParamsTypeComponent
,
],
],
providers
:[
providers
:[
OverAllService
,
OverAllService
,
...
...
src/main/webapp/app/app.route.ts
View file @
eb32b2d5
...
@@ -30,6 +30,7 @@ import {HandleEventComponent} from './work/work-handle/handle-event/handle-event
...
@@ -30,6 +30,7 @@ import {HandleEventComponent} from './work/work-handle/handle-event/handle-event
import
{
ResourceUsabilComponent
}
from
'./analysis/resource-usabil/resource-usabil.component'
;
import
{
ResourceUsabilComponent
}
from
'./analysis/resource-usabil/resource-usabil.component'
;
import
{
OperationWorkComponent
}
from
'./analysis/operation-work/operation-work.component'
;
import
{
OperationWorkComponent
}
from
'./analysis/operation-work/operation-work.component'
;
import
{
ResourceAlarmComponent
}
from
'./analysis/resource-alarm/resource-alarm.component'
;
import
{
ResourceAlarmComponent
}
from
'./analysis/resource-alarm/resource-alarm.component'
;
import
{
PararmsComponent
}
from
'./work/pararms/pararms.component'
;
export
const
route
:
Routes
=
[
export
const
route
:
Routes
=
[
{
path
:
''
,
component
:
JhiMainComponent
,
canActivate
:[
LoginGuard
]},
{
path
:
''
,
component
:
JhiMainComponent
,
canActivate
:[
LoginGuard
]},
...
@@ -67,6 +68,7 @@ export const route: Routes = [
...
@@ -67,6 +68,7 @@ export const route: Routes = [
{
path
:
'resourceUsabil'
,
component
:
ResourceUsabilComponent
,
data
:
{
breadcrumb
:
'资源可用性统计'
},},
{
path
:
'resourceUsabil'
,
component
:
ResourceUsabilComponent
,
data
:
{
breadcrumb
:
'资源可用性统计'
},},
{
path
:
'operationWork'
,
component
:
OperationWorkComponent
,
data
:
{
breadcrumb
:
'运维工作'
},},
{
path
:
'operationWork'
,
component
:
OperationWorkComponent
,
data
:
{
breadcrumb
:
'运维工作'
},},
{
path
:
'resourceAlarm'
,
component
:
ResourceAlarmComponent
,
data
:
{
breadcrumb
:
'资源告警统计'
},},
{
path
:
'resourceAlarm'
,
component
:
ResourceAlarmComponent
,
data
:
{
breadcrumb
:
'资源告警统计'
},},
{
path
:
'params'
,
component
:
PararmsComponent
,
data
:
{
breadcrumb
:
'参数配置'
},},
]
]
},
},
]
]
...
...
src/main/webapp/app/layouts/sidebar/sidebar.component.html
View file @
eb32b2d5
<div
class=
"logo padding-40"
>
<div
class=
"logo padding-40"
>
智能运维监控
智能运维监控
</div>
</div>
<ul
nz-menu
[
nzMode
]="'
inline
'"
>
<ul
nz-menu
[
nzMode
]="'
inline
'"
>
<li
nz-submenu
(
nzOpenChange
)="
openHandler
(
item
)"
*
ngFor=
"let item of menuList"
[(
nzOpen
)]="
item
.
checked
"
>
<ng-container
*
ngFor=
"let item of menuList"
>
<li
nz-submenu
(
nzOpenChange
)="
openHandler
(
item
)"
[(
nzOpen
)]="
item
.
checked
"
>
<span
title
><i
class=
"icon iconfont icon-{{item.imageUrl}}"
></i>
{{item.name}}
</span>
<span
title
><i
class=
"icon iconfont icon-{{item.imageUrl}}"
></i>
{{item.name}}
</span>
<ul>
<ul>
<li
nz-menu-item
*
ngFor=
"let child of item.children"
routerLink=
"{{child.url}}"
>
{{child.name}}
</li>
<ng-container
*
ngFor=
"let child of item.children"
>
<li
nz-menu-item
routerLink=
"{{child.url}}"
>
{{child.name}}
</li>
</ng-container>
</ul>
</ul>
</li>
</li>
</ul>
</ng-container>
</ul>
src/main/webapp/app/layouts/sidebar/sidebar.component.ts
View file @
eb32b2d5
...
@@ -17,6 +17,251 @@ import {CommonService} from '../../shared/common/common.service';
...
@@ -17,6 +17,251 @@ import {CommonService} from '../../shared/common/common.service';
export
class
SidebarComponent
implements
OnInit
{
export
class
SidebarComponent
implements
OnInit
{
token
:
boolean
;
token
:
boolean
;
menuList
=
[{
"id"
:
"61fbf8d185184cd0ad3afb071c350f35"
,
"parentId"
:
"b9a99765784c44378141c789fd8e8c80"
,
"name"
:
"综合监控"
,
"code"
:
"monitor"
,
"url"
:
""
,
"imageUrl"
:
"zhjk"
,
"showOrder"
:
2
,
"checked"
:
false
,
},
{
"id"
:
"gc44aacf0db14ac28f0189b6d68d8097"
,
"parentId"
:
"b9a99765784c44378141c789fd8e8c80"
,
"name"
:
"告警管理"
,
"code"
:
"warning"
,
"url"
:
null
,
"imageUrl"
:
"gjgl"
,
"showOrder"
:
3
,
"checked"
:
false
,
},
{
"id"
:
"ed8ad2d8aca64d1ea896fb659b64b258"
,
"parentId"
:
"b9a99765784c44378141c789fd8e8c80"
,
"name"
:
"网络拓扑"
,
"code"
:
"networkTopology"
,
"url"
:
null
,
"imageUrl"
:
"wltp"
,
"showOrder"
:
4
,
"checked"
:
false
,
},
{
"id"
:
"844f455d4e11448cad99f40a913980f9"
,
"parentId"
:
"b9a99765784c44378141c789fd8e8c80"
,
"name"
:
"统计分析"
,
"code"
:
"analysis"
,
"url"
:
null
,
"imageUrl"
:
"tjfx"
,
"showOrder"
:
5
,
"checked"
:
false
,
},
{
"id"
:
"0b117c84245a4e2ea8a47696cf2a84c3"
,
"parentId"
:
"b9a99765784c44378141c789fd8e8c80"
,
"name"
:
"运维工作"
,
"code"
:
"work"
,
"url"
:
null
,
"imageUrl"
:
"ywgz"
,
"showOrder"
:
7
,
"checked"
:
false
,
},
{
"id"
:
"0050d077f2ef4f3ab7289bf7d0f215ed"
,
"parentId"
:
"b9a99765784c44378141c789fd8e8c80"
,
"name"
:
"系统管理"
,
"code"
:
"systemManage"
,
"url"
:
""
,
"imageUrl"
:
"xtgl"
,
"showOrder"
:
9
,
"checked"
:
false
,
},
{
"id"
:
"74f82e90eb954cfbb3899cb3a1309d9f"
,
"parentId"
:
"61fbf8d185184cd0ad3afb071c350f35"
,
"name"
:
"基础资源监控"
,
"code"
:
"basicMonitor"
,
"url"
:
"basic"
,
"imageUrl"
:
null
,
"showOrder"
:
20
,
"checked"
:
false
,
},
{
"id"
:
"4344ebab149f432785d68ba44808cef4"
,
"parentId"
:
"61fbf8d185184cd0ad3afb071c350f35"
,
"name"
:
"网站监测"
,
"code"
:
"networkCheck"
,
"url"
:
"networkCheck"
,
"imageUrl"
:
null
,
"showOrder"
:
23
,
"checked"
:
false
,
},
{
"id"
:
"8046ff846b084444a17ace798d5edd54"
,
"parentId"
:
"gc44aacf0db14ac28f0189b6d68d8097"
,
"name"
:
"当前告警"
,
"code"
:
"currentWarning"
,
"url"
:
"nowAlarm"
,
"imageUrl"
:
null
,
"showOrder"
:
30
,
"checked"
:
false
,
},
{
"id"
:
"fea1222fe75e4c47b2376712c1f85c92"
,
"parentId"
:
"gc44aacf0db14ac28f0189b6d68d8097"
,
"name"
:
"告警记录"
,
"code"
:
"warningReport"
,
"url"
:
"alarmList"
,
"imageUrl"
:
null
,
"showOrder"
:
31
,
"checked"
:
false
,
},
{
"id"
:
"f610f1243374404ca61d60c58d3c1acc"
,
"parentId"
:
"gc44aacf0db14ac28f0189b6d68d8097"
,
"name"
:
"告警推送日志"
,
"code"
:
"warningLog"
,
"url"
:
"alarmLog"
,
"imageUrl"
:
null
,
"showOrder"
:
32
,
"checked"
:
false
,
},
{
"id"
:
"079f2fd721a7413dba4b884db7f548d1"
,
"parentId"
:
"gc44aacf0db14ac28f0189b6d68d8097"
,
"name"
:
"告警推送设置"
,
"code"
:
"warningSet"
,
"url"
:
"alarmSet"
,
"imageUrl"
:
null
,
"showOrder"
:
33
,
"checked"
:
false
,
},
{
"id"
:
"945de8965e2547db8d1622d990abf8bf"
,
"parentId"
:
"gc44aacf0db14ac28f0189b6d68d8097"
,
"name"
:
"发送推送设置"
,
"code"
:
"sendSet"
,
"url"
:
"sendSet"
,
"imageUrl"
:
null
,
"showOrder"
:
34
,
"checked"
:
false
,
},
{
"id"
:
"35cfe93b5abd40b0a628d9efe458acc6"
,
"parentId"
:
"ed8ad2d8aca64d1ea896fb659b64b258"
,
"name"
:
"网络拓扑图"
,
"code"
:
"neTopology"
,
"url"
:
"neTopology"
,
"imageUrl"
:
null
,
"showOrder"
:
40
,
"checked"
:
false
,
},
{
"id"
:
"4927d17f0fef48469212e6095663750b"
,
"parentId"
:
"ed8ad2d8aca64d1ea896fb659b64b258"
,
"name"
:
"拓扑图标管理"
,
"code"
:
"topoImg"
,
"url"
:
"topoImg"
,
"imageUrl"
:
null
,
"showOrder"
:
41
,
"checked"
:
false
,
},
{
"id"
:
"6cf6928899c0482496d6a6d96b9a1f8c"
,
"parentId"
:
"ed8ad2d8aca64d1ea896fb659b64b258"
,
"name"
:
"流量趋势"
,
"code"
:
"flowTrend"
,
"url"
:
"flowTrend"
,
"imageUrl"
:
null
,
"showOrder"
:
42
,
"checked"
:
false
,
},
{
"id"
:
"6b4e1efa60a5411ba9f0721521aeeef0"
,
"parentId"
:
"844f455d4e11448cad99f40a913980f9"
,
"name"
:
"资源告警统计"
,
"code"
:
"resourceAlarm"
,
"url"
:
"resourceAlarm"
,
"imageUrl"
:
null
,
"showOrder"
:
50
,
"checked"
:
false
,
},
{
"id"
:
"68aac639bec6467d8fd4a52d9184504f"
,
"parentId"
:
"844f455d4e11448cad99f40a913980f9"
,
"name"
:
"资源可用性统计"
,
"code"
:
"resourceUsabil"
,
"url"
:
"resourceUsabil"
,
"imageUrl"
:
null
,
"showOrder"
:
51
,
"checked"
:
false
,
},
{
"id"
:
"2c529665252341bebd289c2758b66ad2"
,
"parentId"
:
"844f455d4e11448cad99f40a913980f9"
,
"name"
:
"运维工作统计"
,
"code"
:
"operationWork"
,
"url"
:
"operationWork"
,
"imageUrl"
:
null
,
"showOrder"
:
53
,
"checked"
:
false
,
},
{
"id"
:
"f94960af576c4bd99cbbbb4a9020f5f1"
,
"parentId"
:
"0b117c84245a4e2ea8a47696cf2a84c3"
,
"name"
:
"事件处置"
,
"code"
:
"workHandle"
,
"url"
:
"workHandle"
,
"imageUrl"
:
null
,
"showOrder"
:
70
,
"checked"
:
false
,
},
{
"id"
:
"d7209f1d3a8b4f02ae8fc3f8b30b8aa1"
,
"parentId"
:
"0b117c84245a4e2ea8a47696cf2a84c3"
,
"name"
:
"巡检计划"
,
"code"
:
"inspectPlan"
,
"url"
:
"inspectPlan"
,
"imageUrl"
:
null
,
"showOrder"
:
71
,
"checked"
:
false
,
},
{
"id"
:
"3e864a2900574eb289816e74f576a439"
,
"parentId"
:
"0b117c84245a4e2ea8a47696cf2a84c3"
,
"name"
:
"资产备件"
,
"code"
:
"assetPart"
,
"url"
:
"assetPart"
,
"imageUrl"
:
null
,
"showOrder"
:
74
,
"checked"
:
false
,
},
{
"id"
:
"3e864a2900574eb279816e74f576a439"
,
"parentId"
:
"0b117c84245a4e2ea8a47696cf2a84c3"
,
"name"
:
"参数配置"
,
"code"
:
"params"
,
"url"
:
"params"
,
"imageUrl"
:
null
,
"showOrder"
:
75
,
"checked"
:
false
,
},{
"id"
:
"1d17dc2e439f4fd9a3037a619c3eb275"
,
"parentId"
:
"0050d077f2ef4f3ab7289bf7d0f215ed"
,
"name"
:
"组织用户"
,
"code"
:
"organizationUser"
,
"url"
:
"group"
,
"imageUrl"
:
null
,
"showOrder"
:
90
,
"checked"
:
false
,
},
{
"id"
:
"3ca073e2c3a24a0fadef89e204ff0dfc"
,
"parentId"
:
"0050d077f2ef4f3ab7289bf7d0f215ed"
,
"name"
:
"角色与权限"
,
"code"
:
"role"
,
"url"
:
"power"
,
"imageUrl"
:
null
,
"showOrder"
:
91
,
"checked"
:
false
,
},
{
"id"
:
"3dba52e512034b3188f6fc0dc77d88dc"
,
"parentId"
:
"0050d077f2ef4f3ab7289bf7d0f215ed"
,
"name"
:
"系统审计"
,
"code"
:
"systemCount"
,
"url"
:
"audit"
,
"imageUrl"
:
null
,
"showOrder"
:
92
,
"checked"
:
false
,
},
{
"id"
:
"5cf71cff20eb46909c966a11329c35ec"
,
"parentId"
:
"0050d077f2ef4f3ab7289bf7d0f215ed"
,
"name"
:
"审核管理"
,
"code"
:
"approveManage"
,
"url"
:
"examine"
,
"imageUrl"
:
null
,
"showOrder"
:
93
,
"checked"
:
false
,
}];
constructor
(
public
router
:
Router
,
private
http
:
Http
,
constructor
(
public
router
:
Router
,
private
http
:
Http
,
public
layoutSer
:
LayoutService
,
public
layoutSer
:
LayoutService
,
public
commonSer
:
CommonService
,
public
commonSer
:
CommonService
,
...
@@ -24,10 +269,9 @@ export class SidebarComponent implements OnInit {
...
@@ -24,10 +269,9 @@ export class SidebarComponent implements OnInit {
private
$sessionStorage
:
SessionStorageService
)
{
private
$sessionStorage
:
SessionStorageService
)
{
}
}
menuList
=
[];
ngOnInit
()
{
ngOnInit
()
{
this
.
getMenu
();
// this.getMenu();
this
.
menuList
=
this
.
commonSer
.
listToTree
(
'id'
,
'parentId'
,
this
.
menuList
);
}
}
getMenu
()
{
getMenu
()
{
...
...
src/main/webapp/app/system/group/group.component.html
View file @
eb32b2d5
...
@@ -39,8 +39,8 @@
...
@@ -39,8 +39,8 @@
<span
class=
"custom-node"
draggable=
"true"
aria-grabbed=
"true"
[
class
.
active
]="
node
.
isSelected
"
>
<span
class=
"custom-node"
draggable=
"true"
aria-grabbed=
"true"
[
class
.
active
]="
node
.
isSelected
"
>
<span>
<span>
{{node.title}}
{{node.title}}
<i
style=
"margin-left: 20px;"
class=
"anticon anticon-edit"
></i>
<i
(
click
)="
editGroup
(
node
)"
style=
"margin-left: 20px;"
class=
"anticon anticon-edit"
></i>
<i
class=
"anticon anticon-close-circle-o"
></i>
<i
(
click
)="
deleteGroup
(
node
)"
class=
"anticon anticon-close-circle-o"
></i>
</span>
</span>
</span>
</span>
</ng-template>
</ng-template>
...
...
src/main/webapp/app/work/modal/params-type/params-type.component.html
0 → 100644
View file @
eb32b2d5
<!--事件分类&&计划分类-->
<nz-modal
[(
nzVisible
)]="
isVisiable
"
[
nzTitle
]="
title
"
(
nzOnCancel
)="
handleCancel
()"
(
nzOnOk
)="
handleOk
()"
>
<form
nz-form
[
formGroup
]="
validateForm
"
>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"name"
>
名称
</nz-form-label>
<nz-form-control
[
nzSpan
]="
12
"
>
<input
type=
"text"
nz-input
formControlName=
"name"
placeholder=
"名称"
>
<nz-form-explain
*
ngIf=
"validateForm.get('name').dirty && validateForm.get('name').errors"
>
请输入分类名称
</nz-form-explain>
</nz-form-control>
</nz-form-item>
</form>
</nz-modal>
src/main/webapp/app/work/modal/params-type/params-type.component.ts
0 → 100644
View file @
eb32b2d5
import
{
Component
,
EventEmitter
,
OnInit
,
Output
}
from
'@angular/core'
;
import
{
FormBuilder
,
FormGroup
,
Validators
}
from
'@angular/forms'
;
import
{
EmitService
}
from
'../../../shared/event/eventEmitter'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
import
{
WorkService
}
from
'../../work.service'
;
@
Component
({
selector
:
'smart-params-type'
,
templateUrl
:
'./params-type.component.html'
,
styles
:
[]
})
export
class
ParamsTypeComponent
implements
OnInit
{
@
Output
()
done
=
new
EventEmitter
<
any
>
();
title
;
isVisiable
=
false
;
validateForm
:
FormGroup
;
type
;
typeId
;
constructor
(
private
fb
:
FormBuilder
,
private
workSer
:
WorkService
,
private
message
:
NzMessageService
,
private
emitService
:
EmitService
)
{
}
ngOnInit
()
{
this
.
initForm
();
}
//初始化
initForm
()
{
this
.
validateForm
=
this
.
fb
.
group
({
name
:
[
''
,
[
Validators
.
required
]],
type
:
[
null
]
});
}
showAddModal
(
title
,
type
):
void
{
this
.
type
=
type
;
this
.
title
=
title
;
this
.
isVisiable
=
true
;
}
showEditModal
(
title
,
type
,
id
,
item
)
{
this
.
title
=
title
;
this
.
isVisiable
=
true
;
this
.
type
=
type
;
this
.
typeId
=
id
;
this
.
validateForm
.
patchValue
(
item
);
}
handleOk
()
{
for
(
let
i
in
this
.
validateForm
.
controls
)
{
this
.
validateForm
.
controls
[
i
].
markAsDirty
();
this
.
validateForm
.
controls
[
i
].
updateValueAndValidity
();
}
if
(
this
.
validateForm
.
invalid
)
{
return
false
;
}
this
.
validateForm
.
value
.
type
=
this
.
type
;
if
(
this
.
title
==
'添加计划分类'
||
this
.
title
==
'添加事件分类'
)
{
this
.
create
();
}
if
(
this
.
title
==
'编辑事件分类'
||
this
.
title
==
'编辑计划分类'
){
this
.
update
();
}
}
create
()
{
this
.
workSer
.
createTypeByparams
(
this
.
validateForm
.
value
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
message
.
info
(
'添加成功'
);
this
.
isVisiable
=
false
;
this
.
done
.
emit
();
this
.
initForm
();
}
else
{
this
.
message
.
info
(
res
.
errMsg
);
}
}
);
}
update
()
{
const
data
=
{
id
:
this
.
typeId
,
name
:
this
.
validateForm
.
value
.
name
};
this
.
workSer
.
updateTypeByparams
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
message
.
success
(
'修改成功'
);
this
.
isVisiable
=
false
;
this
.
done
.
emit
();
this
.
initForm
();
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
}
);
}
handleCancel
():
void
{
this
.
isVisiable
=
false
;
this
.
initForm
();
}
}
src/main/webapp/app/work/modal/type-asets/type-asets.component.html
View file @
eb32b2d5
<!--事件分类-->
<nz-modal
[(
nzVisible
)]="
isVisible
"
nzTitle=
"{{title}}"
(
nzOnCancel
)="
handleCancel
()"
(
nzOnOk
)="
handleOk
()"
>
<nz-modal
[(
nzVisible
)]="
isVisible
"
nzTitle=
"{{title}}"
(
nzOnCancel
)="
handleCancel
()"
(
nzOnOk
)="
handleOk
()"
>
<form
nz-form
[
formGroup
]="
validateForm
"
>
<form
nz-form
[
formGroup
]="
validateForm
"
>
<nz-form-item>
<nz-form-item>
...
...
src/main/webapp/app/work/pararms/pararms.component.html
0 → 100644
View file @
eb32b2d5
<!--参数配置-->
<div
nz-row
class=
"breadcrumbs"
>
<div
nz-col
nzSpan=
"16"
>
<nz-breadcrumb
class=
"padding-8-0"
>
<nz-breadcrumb-item>
首页
</nz-breadcrumb-item>
<nz-breadcrumb-item>
<a>
运维工作
</a>
</nz-breadcrumb-item>
<nz-breadcrumb-item>
参数配置
</nz-breadcrumb-item>
</nz-breadcrumb>
</div>
<div
nz-col
nzSpan=
"8"
class=
"text-right"
>
<button
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-search"
></i></button>
<button
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-sync"
></i></button>
<button
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-arrows-alt"
></i></button>
</div>
</div>
<div
nz-row
>
<div
nz-col
class=
"text-right"
nzSpan=
"3"
>
事件编号前缀
</div>
<div
nz-col
nzSpan=
"1"
></div>
<div
nz-col
nzSpan=
"16"
>
<input
nz-input
placeholder=
"事件编号前缀"
nzDisabled=
"{{isDisabled}}"
[(
ngModel
)]="
value
"
>
<button
*
ngIf=
"isDisabled"
(
click
)="
editType
()"
nz-button
nzType=
"default"
>
编辑
</button>
<button
*
ngIf=
"!isDisabled"
(
click
)="
saveType
()"
nz-button
nzType=
"default"
>
保存
</button>
</div>
</div>
<div
nz-row
>
<div
nz-col
class=
"text-right"
nzSpan=
"3"
>
事件分类
</div>
<div
nz-col
nzSpan=
"1"
></div>
<div
nz-col
nzSpan=
"18"
>
<div>
<button
(
click
)="
showAddModal
('添加事件分类',
0
)"
nz-button
nzType=
"default"
>
添加
</button>
</div>
<div
*
ngFor=
"let item of eventList;"
>
<span>
{{item.name}}
</span>
<span
(
click
)="
showEditModal
('编辑事件分类',
1
,
item
)"
>
编辑
</span>
<span
(
click
)="
deleteItem
(
item
)"
>
删除
</span>
</div>
</div>
</div>
<div
nz-row
>
<div
nz-col
class=
"text-right"
nzSpan=
"3"
>
计划分类
</div>
<div
nz-col
nzSpan=
"1"
></div>
<div
nz-col
nzSpan=
"18"
>
<div>
<button
(
click
)="
showAddModal
('添加计划分类',
1
)"
nz-button
nzType=
"default"
>
添加
</button>
</div>
<div
*
ngFor=
"let item of planList;"
>
<span>
{{item.name}}
</span>
<span
(
click
)="
showEditModal
('编辑计划分类',
1
,
item
)"
>
编辑
</span>
<span
(
click
)="
deleteItem
(
item
)"
>
删除
</span>
</div>
</div>
</div>
<smart-params-type
#
smartParamstype
(
done
)="
getList
()"
></smart-params-type>
src/main/webapp/app/work/pararms/pararms.component.ts
0 → 100644
View file @
eb32b2d5
import
{
Component
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
WorkService
}
from
'../work.service'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
import
{
ParamsTypeComponent
}
from
'../modal/params-type/params-type.component'
;
import
{
CommonService
}
from
'../../shared/common/common.service'
;
@
Component
({
selector
:
'smart-pararms'
,
templateUrl
:
'./pararms.component.html'
,
styles
:
[]
})
export
class
PararmsComponent
implements
OnInit
{
@
ViewChild
(
'smartParamstype'
)
smartParamstype
:
ParamsTypeComponent
;
eventList
;
planList
;
value
;
isDisabled
=
true
;
constructor
(
private
workSer
:
WorkService
,
private
message
:
NzMessageService
,
private
commomSer
:
CommonService
)
{
}
ngOnInit
()
{
this
.
getList
();
}
//获取分类列表
getList
(){
const
data
=
{
type
:
0
};
this
.
workSer
.
findParamsByType
(
data
).
subscribe
(
(
res
)
=>
{
this
.
eventList
=
res
.
data
;
}
);
data
.
type
=
1
;
this
.
workSer
.
findParamsByType
(
data
).
subscribe
(
(
res
)
=>
{
this
.
planList
=
res
.
data
;
}
)
}
//0=事件分类, 1=计划分类
showAddModal
(
title
,
type
){
this
.
smartParamstype
.
showAddModal
(
title
,
type
);
}
showEditModal
(
title
,
type
,
item
){
this
.
smartParamstype
.
showEditModal
(
title
,
type
,
item
.
id
,
item
);
}
//删除分类
deleteItem
(
item
){
this
.
commomSer
.
deleteThing
(
"确定删除该分类?"
,()
=>
{
const
data
=
{
ids
:[]
};
data
.
ids
.
push
(
item
.
id
);
this
.
workSer
.
deleteTypeByparams
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
this
.
message
.
success
(
"删除成功"
);
this
.
getList
()
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
}
)
})
}
editType
(){
this
.
isDisabled
=
false
;
}
saveType
(){
this
.
isDisabled
=
true
;
}
}
src/main/webapp/app/work/work.service.ts
View file @
eb32b2d5
...
@@ -148,4 +148,24 @@ export class WorkService {
...
@@ -148,4 +148,24 @@ export class WorkService {
deleteType
(
data
):
Observable
<
any
>
{
deleteType
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/inventory/deleteType'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/inventory/deleteType'
,
data
);
}
}
//根据type查找
findParamsByType
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/syseventType/findByType'
,
data
);
}
//添加类型
createTypeByparams
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/syseventType/create'
,
data
);
}
//修改分类
updateTypeByparams
(
data
):
Observable
<
any
>
{
return
this
.
http
.
put
(
SERVER_API_URL
+
'/syseventType/update'
,
data
);
}
//删除分类
deleteTypeByparams
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/syseventType/delete'
,
data
);
}
}
}
src/main/webapp/content/css/documentation.css
View file @
eb32b2d5
...
@@ -99,3 +99,7 @@
...
@@ -99,3 +99,7 @@
.ant-checkbox-group
label
:first-child
{
.ant-checkbox-group
label
:first-child
{
margin-left
:
8px
;
margin-left
:
8px
;
}
}
.text-right
{
}
\ No newline at end of file
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