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
74840dd8
Commit
74840dd8
authored
Jan 15, 2020
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug update
parent
b7058d04
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
68 additions
and
29 deletions
+68
-29
notification.interceptor.ts
...webapp/app/blocks/interceptor/notification.interceptor.ts
+1
-1
b-overview.component.html
.../webapp/app/business/b-overview/b-overview.component.html
+2
-3
b-overview.component.ts
...in/webapp/app/business/b-overview/b-overview.component.ts
+12
-1
b-topology.component.ts
...in/webapp/app/business/b-topology/b-topology.component.ts
+10
-1
website.component.html
src/main/webapp/app/modal/website/website.component.html
+2
-3
network-check.component.html
...pp/app/overAll/network-check/network-check.component.html
+1
-1
common.service.ts
src/main/webapp/app/shared/common/common.service.ts
+23
-9
child-assets.component.ts
...pp/work/asset-part/child-assets/child-assets.component.ts
+1
-1
inspect-plan-config.component.html
...rk/inspect-plan-config/inspect-plan-config.component.html
+1
-1
inspect-plan-config.component.ts
...work/inspect-plan-config/inspect-plan-config.component.ts
+2
-2
inspect-plan.component.html
.../webapp/app/work/inspect-plan/inspect-plan.component.html
+3
-2
spare-parts.component.html
...app/app/work/modal/spare-parts/spare-parts.component.html
+8
-2
spare-parts.component.ts
...ebapp/app/work/modal/spare-parts/spare-parts.component.ts
+1
-1
work-handle.component.html
...in/webapp/app/work/work-handle/work-handle.component.html
+1
-1
No files found.
src/main/webapp/app/blocks/interceptor/notification.interceptor.ts
View file @
74840dd8
...
...
@@ -31,7 +31,7 @@ export class NotificationInterceptor implements HttpInterceptor {
if
(
data
&&
data
.
errCode
)
{
const
errCode
=
data
.
errCode
;
const
errMsg
=
data
.
errMsg
;
if
(
errCode
&&
errCode
!=
10000
&&
errCode
!=
10099
)
{
if
(
errCode
&&
errCode
!=
10000
&&
errCode
!=
10099
&&
errCode
==
10103
)
{
this
.
notification
.
create
(
'error'
,
`错误码:
${
errCode
}
`
,
`
${
errMsg
}
`
,
{
nzDuration
:
2000
});
}
}
...
...
src/main/webapp/app/business/b-overview/b-overview.component.html
View file @
74840dd8
...
...
@@ -44,7 +44,7 @@
</div>
<div
nz-col
nzSpan=
"12"
class=
"spanBorder"
>
<span
(
click
)="
reportDetail
(
item
)"
>
运行报告
</span>
<span
routerLink=
"../bTopology"
>
业务拓扑
</span>
<span
(
click
)="
goTo
(
item
)"
>
业务拓扑
</span>
<span
routerLink=
"../effectAnalysis"
>
效能分析
</span>
</div>
</div>
...
...
@@ -75,4 +75,4 @@
</div>
<!--运行报告-->
<smart-work-report
#
smartWorkReport
></smart-work-report>
\ No newline at end of file
<smart-work-report
#
smartWorkReport
></smart-work-report>
src/main/webapp/app/business/b-overview/b-overview.component.ts
View file @
74840dd8
...
...
@@ -3,6 +3,7 @@ import {BusinessService} from '../business.service';
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
import
{
color
}
from
'../../app.constants'
;
import
{
WorkReportComponent
}
from
'../modal/work-report/work-report.component'
;
import
{
Router
}
from
'@angular/router'
;
@
Component
({
selector
:
'smart-b-overview'
,
...
...
@@ -108,7 +109,8 @@ export class BOverviewComponent implements OnInit {
color
=
color
;
list
;
constructor
(
private
busineSer
:
BusinessService
,
private
message
:
NzMessageService
)
{
constructor
(
private
busineSer
:
BusinessService
,
private
message
:
NzMessageService
,
private
router
:
Router
)
{
}
ngOnInit
()
{
...
...
@@ -203,4 +205,13 @@ export class BOverviewComponent implements OnInit {
this
.
smartWorkReport
.
showModal
(
item
);
}
//bTopology
goTo
(
item
){
this
.
router
.
navigate
([
'app/main/bTopology'
],{
queryParams
:{
topoId
:
item
.
id
}
})
}
}
src/main/webapp/app/business/b-topology/b-topology.component.ts
View file @
74840dd8
import
{
AfterViewInit
,
Component
,
ElementRef
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
BusinessService
}
from
'../business.service'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
import
{
ActivatedRoute
,
Router
}
from
'@angular/router'
;
declare
let
editor
:
any
;
...
...
@@ -95,7 +96,15 @@ export class BTopologyComponent implements OnInit, AfterViewInit {
backgroundColor
;
editType
=
'只读模式'
;
constructor
(
private
busineSer
:
BusinessService
,
private
message
:
NzMessageService
)
{
constructor
(
private
busineSer
:
BusinessService
,
private
message
:
NzMessageService
,
private
routerInfo
:
ActivatedRoute
)
{
this
.
routerInfo
.
queryParams
.
subscribe
(
(
res
)
=>
{
console
.
log
(
res
);
this
.
topoId
=
res
.
topoId
;
this
.
getDetail
();
}
);
}
ngOnInit
()
{
...
...
src/main/webapp/app/modal/website/website.component.html
View file @
74840dd8
...
...
@@ -17,9 +17,9 @@
<div
nz-col
[
nzSpan
]="
12
"
>
<nz-form-item
nzFlex
>
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
nzRequired
nzFor=
"delay"
>
更新间隔
</nz-form-label>
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
nzRequired
nzFor=
"delay"
>
更新间隔
(s)
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
id=
"delay"
name=
"delay"
nz-input
placeholder=
"更新间隔
"
[(
ngModel
)]="
validateForm
.
delay
"
>
<input
id=
"delay"
name=
"delay"
type=
"number"
nz-input
placeholder=
"更新间隔(s)
"
[(
ngModel
)]="
validateForm
.
delay
"
>
</nz-form-control>
</nz-form-item>
</div>
...
...
@@ -247,7 +247,6 @@
</nz-form-control>
</nz-form-item>
<div
class=
"modal-footer-btn"
>
<button
nz-button
(
click
)="
closeCon
(
i
,
false
)"
nzType=
"primary"
>
取消
</button>
<button
nz-button
(
click
)="
closeCon
(
i
,
true
)"
nzType=
"primary"
>
保存
</button>
</div>
</div>
...
...
src/main/webapp/app/overAll/network-check/network-check.component.html
View file @
74840dd8
...
...
@@ -67,7 +67,7 @@
<th>
状态
</th>
<th
nzWidth=
"20%"
>
最近检查记录
</th>
<th>
步骤数量
</th>
<th>
间隔
</th>
<th>
间隔
(s)
</th>
<th>
尝试次数
</th>
<th>
认证
</th>
<th>
Http代理
</th>
...
...
src/main/webapp/app/shared/common/common.service.ts
View file @
74840dd8
...
...
@@ -96,7 +96,7 @@ export class CommonService implements OnInit {
toFormData
(
json
)
{
let
formData
=
new
FormData
();
for
(
let
k
in
json
)
{
formData
.
append
(
k
,
json
[
k
])
formData
.
append
(
k
,
json
[
k
])
;
}
return
formData
;
}
...
...
@@ -195,6 +195,11 @@ export class CommonService implements OnInit {
*/
getTimeByType
(
timeType
)
{
const
nowDate
=
new
Date
().
getTime
();
const
now
=
new
Date
();
//当前日期
const
nowDayOfWeek
=
now
.
getDay
();
//今天本周的第几天
const
nowDay
=
now
.
getDate
();
//当前日
const
nowMonth
=
now
.
getMonth
();
//当前月
const
nowYear
=
now
.
getFullYear
();
//当前年
let
day1
,
day2
;
//当作变量使用
let
obj
=
{
startTime
:
null
,
endTime
:
null
};
switch
(
timeType
)
{
...
...
@@ -223,17 +228,17 @@ export class CommonService implements OnInit {
break
;
}
case
'4'
:
{
//最近一周
day1
=
nowDate
-
7
*
24
*
60
*
60
*
1000
;
day2
=
nowDate
;
obj
.
startTime
=
this
.
datePipe
.
transform
(
day1
,
'yyyy-MM-dd'
)
+
' 00:00:00'
;
obj
.
endTime
=
this
.
datePipe
.
transform
(
day2
,
'yyyy-MM-dd'
)
+
' 23:59:59'
;
const
weekStartDate
=
new
Date
(
nowYear
,
nowMonth
,
nowDay
-
nowDayOfWeek
)
;
const
weekEndDate
=
new
Date
(
nowYear
,
nowMonth
,
nowDay
+
(
7
-
nowDayOfWeek
))
;
obj
.
startTime
=
this
.
datePipe
.
transform
(
weekStartDate
,
'yyyy-MM-dd'
)
+
' 00:00:00'
;
obj
.
endTime
=
this
.
datePipe
.
transform
(
weekEndDate
,
'yyyy-MM-dd'
)
+
' 23:59:59'
;
break
;
}
case
'5'
:
{
//最近一个月
day1
=
nowDate
-
30
*
24
*
60
*
60
*
1000
;
day2
=
nowDate
;
obj
.
startTime
=
this
.
datePipe
.
transform
(
day1
,
'yyyy-MM-dd'
)
+
' 00:00:00'
;
obj
.
endTime
=
this
.
datePipe
.
transform
(
day2
,
'yyyy-MM-dd'
)
+
' 23:59:59'
;
const
monthStartDate
=
new
Date
(
nowYear
,
nowMonth
,
1
)
;
const
monthEndDate
=
new
Date
(
nowYear
,
nowMonth
,
this
.
getMonthDays
(
nowMonth
))
;
obj
.
startTime
=
this
.
datePipe
.
transform
(
monthStartDate
,
'yyyy-MM-dd'
)
+
' 00:00:00'
;
obj
.
endTime
=
this
.
datePipe
.
transform
(
monthEndDate
,
'yyyy-MM-dd'
)
+
' 23:59:59'
;
break
;
}
case
'6'
:
{
//最近一年
...
...
@@ -250,6 +255,15 @@ export class CommonService implements OnInit {
return
obj
;
}
//获取某月的天数
getMonthDays
(
myMonth
)
{
const
nowYear
=
new
Date
().
getFullYear
();
//当前年
const
monthStartDate
=
<
any
>
new
Date
(
nowYear
,
myMonth
,
1
);
const
monthEndDate
=
<
any
>
new
Date
(
nowYear
,
myMonth
+
1
,
1
);
const
days
=
(
monthEndDate
-
monthStartDate
)
/
(
1000
*
60
*
60
*
24
);
return
days
;
}
//内存单位换算
unitConversion
(
unit
)
{
let
res
;
...
...
src/main/webapp/app/work/asset-part/child-assets/child-assets.component.ts
View file @
74840dd8
...
...
@@ -119,12 +119,12 @@ export class ChildAssetsComponent implements OnInit {
//删除资产--单个
deleteInVentory
(
item
){
this
.
isLoading
=
true
;
const
data
=
{
inventoryIds
:[]
};
data
.
inventoryIds
.
push
(
item
.
id
);
this
.
commonSer
.
confirmThing
(
"删除"
,
"确定删除该资产?"
,()
=>
{
this
.
isLoading
=
true
;
this
.
workSer
.
deleteInventory
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
...
...
src/main/webapp/app/work/inspect-plan-config/inspect-plan-config.component.html
View file @
74840dd8
...
...
@@ -48,7 +48,7 @@
[
nzValue
]="
item
.
value
"
>
{{item.label}}
</label>
</nz-radio-group>
</div>
<div
nz-col
nzSpan=
"
6
"
>
<div
nz-col
nzSpan=
"
8
"
>
<ng-container
*
ngIf=
"time.type == '99'"
>
<nz-date-picker
[
nzFormat
]="
timeFormat
"
...
...
src/main/webapp/app/work/inspect-plan-config/inspect-plan-config.component.ts
View file @
74840dd8
...
...
@@ -63,8 +63,8 @@ export class InspectPlanConfigComponent implements OnInit {
searchStr
:
this
.
obj
.
searchStr
,
typeId
:
this
.
obj
.
typeId
,
status
:
this
.
obj
.
status
,
nextExecutionStart
:
this
.
obj
.
nextExecutionStart
,
//开始时间
nextExecutionEnd
:
this
.
obj
.
nextExecutionEnd
,
//结束时间
nextExecutionStart
:
this
.
obj
.
nextExecutionStart
?
new
Date
(
this
.
obj
.
nextExecutionStart
).
getTime
()
:
null
,
//开始时间
nextExecutionEnd
:
this
.
obj
.
nextExecutionEnd
?
new
Date
(
this
.
obj
.
nextExecutionEnd
).
getTime
()
:
null
,
//结束时间
};
this
.
workSer
.
findPlanList
(
obj
).
subscribe
(
(
res
)
=>
{
...
...
src/main/webapp/app/work/inspect-plan/inspect-plan.component.html
View file @
74840dd8
...
...
@@ -24,8 +24,9 @@
<div
nz-col
nzSpan=
"4"
>
<nz-select
nzAllowClear
style=
"width: 100%;"
[(
ngModel
)]="
obj
.
status
"
nzPlaceHolder=
"计划状态"
>
<nz-option
nzLabel=
"未开始"
nzValue=
"0"
></nz-option>
<nz-option
nzLabel=
"进行中"
nzValue=
"1"
></nz-option>
<nz-option
nzLabel=
"结束"
nzValue=
"2"
></nz-option>
<nz-option
nzLabel=
"待处理"
nzValue=
"1"
></nz-option>
<nz-option
nzLabel=
"已完成"
nzValue=
"2"
></nz-option>
<nz-option
nzLabel=
"待确认"
nzValue=
"3"
></nz-option>
</nz-select>
</div>
<div
nz-col
nzSpan=
"4"
>
...
...
src/main/webapp/app/work/modal/spare-parts/spare-parts.component.html
View file @
74840dd8
...
...
@@ -9,19 +9,25 @@
<div
nz-row
[
nzGutter
]="
24
"
>
<div
nz-col
[
nzSpan
]="
12
"
>
<nz-form-item
nzFlex
>
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
nzFor=
"inventoryNo"
>
备件编号
</nz-form-label>
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
nz
Required
nz
For=
"inventoryNo"
>
备件编号
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
id=
"inventoryNo"
placeholder=
"备件编号"
name=
"inventoryNo"
type=
"text"
nz-input
formControlName=
"inventoryNo"
>
<nz-form-explain
*
ngIf=
"validateForm.get('inventoryNo').dirty && validateForm.get('inventoryNo').errors"
>
请输入备件编号
</nz-form-explain>
</nz-form-control>
</nz-form-item>
</div>
<div
nz-col
[
nzSpan
]="
12
"
>
<nz-form-item
nzFlex
>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"inventoryName"
>
备件名称
</nz-form-label>
<nz-form-label
[
nzSpan
]="
6
"
nz
Required
nz
For=
"inventoryName"
>
备件名称
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
id=
"inventoryName"
placeholder=
"备件名称"
name=
"inventoryName"
type=
"text"
nz-input
formControlName=
"inventoryName"
>
<nz-form-explain
*
ngIf=
"validateForm.get('inventoryName').dirty && validateForm.get('inventoryName').errors"
>
请输入备件名称
</nz-form-explain>
</nz-form-control>
</nz-form-item>
</div>
...
...
src/main/webapp/app/work/modal/spare-parts/spare-parts.component.ts
View file @
74840dd8
...
...
@@ -38,7 +38,7 @@ export class SparePartsComponent implements OnInit {
initForm
()
{
this
.
validateForm
=
this
.
fb
.
group
({
inventoryNo
:
[
""
],
inventoryName
:
[
""
],
inventoryNo
:
[
""
,[
Validators
.
required
]],
inventoryName
:
[
""
,[
Validators
.
required
]
],
inventoryTypeId
:
[
""
],
inventoryType
:
[
""
],
amount
:
[
""
],
contact
:
[
""
],
name
:
[
""
],
brand
:
[
""
],
model
:
[
""
],
serialNo
:
[
""
],
...
...
src/main/webapp/app/work/work-handle/work-handle.component.html
View file @
74840dd8
...
...
@@ -31,7 +31,7 @@
<div
nz-col
nzSpan=
"2"
>
<nz-select
nzAllowClear
style=
"width: 100%;"
[(
ngModel
)]="
obj
.
status
"
nzPlaceHolder=
"事件状态"
>
<nz-option
nzLabel=
"待处理"
nzValue=
"0"
></nz-option>
<nz-option
nzLabel=
"
确认评价
"
nzValue=
"2"
></nz-option>
<nz-option
nzLabel=
"
待确认
"
nzValue=
"2"
></nz-option>
<nz-option
nzLabel=
"已结束"
nzValue=
"1"
></nz-option>
</nz-select>
</div>
...
...
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