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
b75f4d57
Commit
b75f4d57
authored
Jan 15, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
207405ee
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
22 deletions
+40
-22
basic-edit.component.html
...ain/webapp/app/modal/basic-edit/basic-edit.component.html
+10
-14
basic-edit.component.ts
src/main/webapp/app/modal/basic-edit/basic-edit.component.ts
+18
-6
plan-modal.component.html
...ebapp/app/work/modal/plan-modal/plan-modal.component.html
+1
-0
plan-modal.component.ts
.../webapp/app/work/modal/plan-modal/plan-modal.component.ts
+11
-2
No files found.
src/main/webapp/app/modal/basic-edit/basic-edit.component.html
View file @
b75f4d57
...
@@ -63,16 +63,6 @@
...
@@ -63,16 +63,6 @@
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<!--<nz-form-item>-->
<!--<nz-form-label [nzSpan]="4" nzFor="serviceid">关联业务</nz-form-label>-->
<!--<nz-form-control [nzSpan]="14">-->
<!--<nz-select name="serviceid" [(ngModel)]="validateForm.hostExtend.serviceid"-->
<!--nzPlaceHolder="无关联业务">-->
<!--<nz-option nzValue="" nzLabel="无"></nz-option>-->
<!--</nz-select>-->
<!--</nz-form-control>-->
<!--</nz-form-item>-->
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
4
"
>
添加接口
</nz-form-label>
<nz-form-label
[
nzSpan
]="
4
"
>
添加接口
</nz-form-label>
<nz-form-control
[
nzSpan
]="
20
"
>
<nz-form-control
[
nzSpan
]="
20
"
>
...
@@ -362,12 +352,18 @@
...
@@ -362,12 +352,18 @@
<!--</nz-tab>-->
<!--</nz-tab>-->
<nz-tab
nzTitle=
"资产登记"
>
<nz-tab
nzTitle=
"资产登记"
>
<div
nz-form
class=
"ant-advanced-search-form form-select"
>
<div
nz-form
class=
"ant-advanced-search-form form-select"
>
<nz-form-item>
<div
nz-row
[
nzGutter
]="
24
"
>
<nz-form-control
[
nzSm
]="
14
"
[
nzXs
]="
24
"
>
<div
nz-col
[
nzSpan
]="
12
"
>
<nz-tag
nzMode=
"checkable"
[
nzChecked
]="!
isInVentory
"
(
nzCheckedChange
)="
checkChange
('
no
')"
>
不需要登记资产
</nz-tag>
<nz-form-item
nzFlex
>
<nz-tag
nzMode=
"checkable"
[
nzChecked
]="
isInVentory
"
(
nzCheckedChange
)="
checkChange
('
yes
')"
>
需要登记资产
</nz-tag>
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
nzRequired
nzFor=
"equipmentTypeid"
>
登记资产
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<button
nz-button
nzSize=
"small"
[
nzType
]="
isYesInVentory
"
(
click
)="
checkChange
('
no
')"
>
不需要
</button>
<button
nz-button
nzSize=
"small"
[
nzType
]="
isNOInVentory
"
(
click
)="
checkChange
('
yes
')"
>
需要
</button>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
</div>
</div>
<ng-container
*
ngIf=
"isInVentory"
>
<ng-container
*
ngIf=
"isInVentory"
>
<div
nz-row
[
nzGutter
]="
24
"
>
<div
nz-row
[
nzGutter
]="
24
"
>
<div
nz-col
[
nzSpan
]="
12
"
>
<div
nz-col
[
nzSpan
]="
12
"
>
...
...
src/main/webapp/app/modal/basic-edit/basic-edit.component.ts
View file @
b75f4d57
...
@@ -51,6 +51,8 @@ export class BasicEditComponent implements OnInit {
...
@@ -51,6 +51,8 @@ export class BasicEditComponent implements OnInit {
mainHost
=
'hostType1'
;
//主机tabs
mainHost
=
'hostType1'
;
//主机tabs
isInVentory
=
false
;
isInVentory
=
false
;
isYesInVentory
=
'primary'
;
isNOInVentory
=
'default'
;
inventoryParentId
;
inventoryParentId
;
constructor
(
private
fb
:
FormBuilder
,
private
overAllSer
:
OverAllService
,
constructor
(
private
fb
:
FormBuilder
,
private
overAllSer
:
OverAllService
,
public
message
:
NzMessageService
,
private
workSer
:
WorkService
)
{
public
message
:
NzMessageService
,
private
workSer
:
WorkService
)
{
...
@@ -126,7 +128,7 @@ export class BasicEditComponent implements OnInit {
...
@@ -126,7 +128,7 @@ export class BasicEditComponent implements OnInit {
this
.
validateForm
.
inventoryExtend
=
data
.
inventory
;
this
.
validateForm
.
inventoryExtend
=
data
.
inventory
;
this
.
validateForm
.
hostExtend
=
data
.
hostExtend
;
this
.
validateForm
.
hostExtend
=
data
.
hostExtend
;
this
.
validateForm
.
groups
=
data
.
groups
;
this
.
validateForm
.
groups
=
data
.
groups
;
if
(
data
.
parentTemplates
)
{
if
(
data
.
parentTemplates
)
{
//模版对象
let
tempArr
=
[];
let
tempArr
=
[];
tempArr
=
data
.
parentTemplates
.
map
(
res
=>
{
tempArr
=
data
.
parentTemplates
.
map
(
res
=>
{
return
res
.
templateid
;
return
res
.
templateid
;
...
@@ -135,23 +137,27 @@ export class BasicEditComponent implements OnInit {
...
@@ -135,23 +137,27 @@ export class BasicEditComponent implements OnInit {
this
.
templatesResoure
=
tempArr
;
this
.
templatesResoure
=
tempArr
;
}
}
this
.
interfaceslist
=
data
.
interfaces
;
this
.
interfaceslist
=
data
.
interfaces
;
this
.
interfaceslist
.
forEach
(
res
=>
{
this
.
interfaceslist
.
forEach
(
res
=>
{
//接口对象
res
.
main
=
res
.
main
+
''
;
res
.
main
=
res
.
main
+
''
;
res
.
type
=
res
.
type
+
''
;
res
.
type
=
res
.
type
+
''
;
});
});
this
.
hostTypeChildrenList
=
[];
this
.
hostTypeChildrenList
=
[];
this
.
hostTypeList
.
forEach
(
res
=>
{
this
.
hostTypeList
.
forEach
(
res
=>
{
//主机对象
if
(
this
.
validateForm
.
hostExtend
.
equipmentTypeid
==
res
.
id
)
{
if
(
this
.
validateForm
.
hostExtend
.
equipmentTypeid
==
res
.
id
)
{
this
.
hostTypeChildrenList
=
res
.
childs
;
this
.
hostTypeChildrenList
=
res
.
childs
;
}
}
});
});
if
(
data
.
macros
)
{
if
(
data
.
macros
)
{
//红对象
this
.
macroList1
=
data
.
macros
;
this
.
macroList1
=
data
.
macros
;
}
}
if
(
data
.
inventory
){
//资产对象
for
(
let
i
=
0
;
i
<
this
.
validateForm
.
groups
.
length
;
i
++
)
{
this
.
isInVentory
=
false
;
this
.
isYesInVentory
=
'default'
;
this
.
isNOInVentory
=
'primary'
;
}
for
(
let
i
=
0
;
i
<
this
.
validateForm
.
groups
.
length
;
i
++
)
{
//分组对象
for
(
let
j
=
0
;
j
<
this
.
groupList
.
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
this
.
groupList
.
length
;
j
++
)
{
if
(
this
.
validateForm
.
groups
[
i
].
groupid
==
this
.
groupList
[
j
].
value
)
{
if
(
this
.
validateForm
.
groups
[
i
].
groupid
==
this
.
groupList
[
j
].
value
)
{
this
.
groupList
[
j
].
checked
=
true
;
this
.
groupList
[
j
].
checked
=
true
;
...
@@ -403,15 +409,21 @@ export class BasicEditComponent implements OnInit {
...
@@ -403,15 +409,21 @@ export class BasicEditComponent implements OnInit {
checkChange
(
e
){
checkChange
(
e
){
if
(
e
==
"yes"
){
if
(
e
==
"yes"
){
this
.
isInVentory
=
true
;
this
.
isInVentory
=
true
;
this
.
isYesInVentory
=
'default'
;
this
.
isNOInVentory
=
'primary'
;
}
}
if
(
e
==
"no"
){
if
(
e
==
"no"
){
this
.
isInVentory
=
false
;
this
.
isInVentory
=
false
;
this
.
isYesInVentory
=
'primary'
;
this
.
isNOInVentory
=
'default'
}
}
}
}
//初始化Form信息
//初始化Form信息
initForm
()
{
initForm
()
{
this
.
isInVentory
=
false
;
this
.
isInVentory
=
false
;
this
.
isYesInVentory
=
'primary'
;
this
.
isNOInVentory
=
'default'
;
this
.
templatesResoure
=
[];
this
.
templatesResoure
=
[];
this
.
macroList1
=
[
//配置宏数组
this
.
macroList1
=
[
//配置宏数组
{
{
...
...
src/main/webapp/app/work/modal/plan-modal/plan-modal.component.html
View file @
b75f4d57
...
@@ -41,6 +41,7 @@
...
@@ -41,6 +41,7 @@
nzShowTime
nzShowTime
formControlName=
"startTime"
formControlName=
"startTime"
nzPlaceHolder=
"开始时间"
nzPlaceHolder=
"开始时间"
[
nzDisabled
]="
isDisabled
"
></nz-date-picker>
></nz-date-picker>
<nz-form-explain
*
ngIf=
"validateForm.get('startTime').dirty && validateForm.get('startTime').errors"
>
请选择开始时间
</nz-form-explain>
<nz-form-explain
*
ngIf=
"validateForm.get('startTime').dirty && validateForm.get('startTime').errors"
>
请选择开始时间
</nz-form-explain>
...
...
src/main/webapp/app/work/modal/plan-modal/plan-modal.component.ts
View file @
b75f4d57
...
@@ -3,6 +3,7 @@ import {FormBuilder, FormGroup, Validators} from '@angular/forms';
...
@@ -3,6 +3,7 @@ import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import
{
WorkService
}
from
'../../work.service'
;
import
{
WorkService
}
from
'../../work.service'
;
import
{
NzMessageService
,
UploadFile
}
from
'ng-zorro-antd'
;
import
{
NzMessageService
,
UploadFile
}
from
'ng-zorro-antd'
;
import
{
SelectPersonComponent
}
from
'../../../modal/select-person/select-person.component'
;
import
{
SelectPersonComponent
}
from
'../../../modal/select-person/select-person.component'
;
import
{
DatePipe
}
from
'@angular/common'
;
@
Component
({
@
Component
({
selector
:
'smart-plan-modal'
,
selector
:
'smart-plan-modal'
,
...
@@ -17,6 +18,7 @@ export class PlanModalComponent implements OnInit {
...
@@ -17,6 +18,7 @@ export class PlanModalComponent implements OnInit {
planId
;
planId
;
title
;
title
;
isVisiable
=
false
;
isVisiable
=
false
;
isDisabled
=
false
;
validateForm
:
FormGroup
;
validateForm
:
FormGroup
;
fileList
=
[];
fileList
=
[];
...
@@ -26,7 +28,7 @@ export class PlanModalComponent implements OnInit {
...
@@ -26,7 +28,7 @@ export class PlanModalComponent implements OnInit {
principalsList
=
[];
//负责人
principalsList
=
[];
//负责人
constructor
(
private
workSer
:
WorkService
,
private
message
:
NzMessageService
,
constructor
(
private
workSer
:
WorkService
,
private
message
:
NzMessageService
,
private
fb
:
FormBuilder
)
{
private
fb
:
FormBuilder
,
private
datePipe
:
DatePipe
)
{
}
}
ngOnInit
()
{
ngOnInit
()
{
...
@@ -36,6 +38,7 @@ export class PlanModalComponent implements OnInit {
...
@@ -36,6 +38,7 @@ export class PlanModalComponent implements OnInit {
initForm
()
{
initForm
()
{
this
.
fileList
=
[];
this
.
fileList
=
[];
this
.
isDisabled
=
false
;
this
.
participantsList
=
[];
this
.
participantsList
=
[];
this
.
principalsList
=
[];
this
.
principalsList
=
[];
this
.
validateForm
=
this
.
fb
.
group
({
this
.
validateForm
=
this
.
fb
.
group
({
...
@@ -102,8 +105,10 @@ export class PlanModalComponent implements OnInit {
...
@@ -102,8 +105,10 @@ export class PlanModalComponent implements OnInit {
this
.
validateForm
.
patchValue
({
this
.
validateForm
.
patchValue
({
startTime
:
new
Date
(
res
.
data
.
startTime
),
startTime
:
new
Date
(
res
.
data
.
startTime
),
endTime
:
new
Date
(
res
.
data
.
endTime
),
endTime
:
new
Date
(
res
.
data
.
endTime
),
});
});
if
(
res
.
data
.
status
==
1
){
this
.
isDisabled
=
true
;
}
}
}
)
)
}
}
...
@@ -129,6 +134,10 @@ export class PlanModalComponent implements OnInit {
...
@@ -129,6 +134,10 @@ export class PlanModalComponent implements OnInit {
this
.
validateForm
.
value
.
principals
=
this
.
principalsList
;
this
.
validateForm
.
value
.
principals
=
this
.
principalsList
;
this
.
validateForm
.
value
.
participants
=
this
.
participantsList
;
this
.
validateForm
.
value
.
participants
=
this
.
participantsList
;
this
.
validateForm
.
patchValue
({
startTime
:
this
.
datePipe
.
transform
(
this
.
validateForm
.
value
.
startTime
,
'yyyy-MM-dd HH:mm:ss'
),
endTime
:
this
.
datePipe
.
transform
(
this
.
validateForm
.
value
.
endTime
,
'yyyy-MM-dd HH:mm:ss'
),
});
if
(
this
.
title
==
'添加计划'
)
{
if
(
this
.
title
==
'添加计划'
)
{
this
.
create
();
this
.
create
();
}
}
...
...
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