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
c19c7258
Commit
c19c7258
authored
Dec 13, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
0bc10c8b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
93 additions
and
24 deletions
+93
-24
app.main.module.ts
src/main/webapp/app/app.main.module.ts
+8
-0
app.route.ts
src/main/webapp/app/app.route.ts
+4
-0
asset-part.component.html
...main/webapp/app/work/asset-part/asset-part.component.html
+7
-4
asset-part.component.ts
src/main/webapp/app/work/asset-part/asset-part.component.ts
+22
-2
child-assets.component.ts
...pp/work/asset-part/child-assets/child-assets.component.ts
+16
-1
type-asets.component.html
...ebapp/app/work/modal/type-asets/type-asets.component.html
+10
-16
type-asets.component.ts
.../webapp/app/work/modal/type-asets/type-asets.component.ts
+26
-1
No files found.
src/main/webapp/app/app.main.module.ts
View file @
c19c7258
...
@@ -77,6 +77,10 @@ import {SelectRoleComponent} from './modal/select-role/select-role.component';
...
@@ -77,6 +77,10 @@ import {SelectRoleComponent} from './modal/select-role/select-role.component';
import
{
SeparationComponent
}
from
'./system/modal/separation/separation.component'
;
import
{
SeparationComponent
}
from
'./system/modal/separation/separation.component'
;
import
{
SystemComponent
}
from
'./system/modal/system/system.component'
;
import
{
SystemComponent
}
from
'./system/modal/system/system.component'
;
import
{
SecurityComponent
}
from
'./system/modal/security/security.component'
;
import
{
SecurityComponent
}
from
'./system/modal/security/security.component'
;
import
{
TypeAsetsComponent
}
from
'./work/modal/type-asets/type-asets.component'
;
import
{
AssetsDetailComponent
}
from
'./work/asset-part/assets-detail/assets-detail.component'
;
import
{
AssetsComponent
}
from
'./work/modal/assets/assets.component'
;
import
{
ChildAssetsComponent
}
from
'./work/asset-part/child-assets/child-assets.component'
;
@
NgModule
({
@
NgModule
({
imports
:
[
imports
:
[
...
@@ -154,6 +158,10 @@ import {SecurityComponent} from './system/modal/security/security.component';
...
@@ -154,6 +158,10 @@ import {SecurityComponent} from './system/modal/security/security.component';
SeparationComponent
,
SeparationComponent
,
SystemComponent
,
SystemComponent
,
SecurityComponent
,
SecurityComponent
,
TypeAsetsComponent
,
AssetsDetailComponent
,
AssetsComponent
,
ChildAssetsComponent
,
],
],
providers
:[
providers
:[
OverAllService
,
OverAllService
,
...
...
src/main/webapp/app/app.route.ts
View file @
c19c7258
...
@@ -23,6 +23,8 @@ import {TopologyImgComponent} from './netTopology/topology-img/topology-img.comp
...
@@ -23,6 +23,8 @@ import {TopologyImgComponent} from './netTopology/topology-img/topology-img.comp
import
{
WorkHandleComponent
}
from
'./work/work-handle/work-handle.component'
;
import
{
WorkHandleComponent
}
from
'./work/work-handle/work-handle.component'
;
import
{
InspectPlanComponent
}
from
'./work/inspect-plan/inspect-plan.component'
;
import
{
InspectPlanComponent
}
from
'./work/inspect-plan/inspect-plan.component'
;
import
{
AssetPartComponent
}
from
'./work/asset-part/asset-part.component'
;
import
{
AssetPartComponent
}
from
'./work/asset-part/asset-part.component'
;
import
{
ChildAssetsComponent
}
from
'./work/asset-part/child-assets/child-assets.component'
;
import
{
AssetsDetailComponent
}
from
'./work/asset-part/assets-detail/assets-detail.component'
;
export
const
route
:
Routes
=
[
export
const
route
:
Routes
=
[
{
path
:
''
,
component
:
JhiMainComponent
,
canActivate
:[
LoginGuard
]},
{
path
:
''
,
component
:
JhiMainComponent
,
canActivate
:[
LoginGuard
]},
...
@@ -53,6 +55,8 @@ export const route: Routes = [
...
@@ -53,6 +55,8 @@ export const route: Routes = [
{
path
:
'workHandle'
,
component
:
WorkHandleComponent
},
{
path
:
'workHandle'
,
component
:
WorkHandleComponent
},
{
path
:
'inspectPlan'
,
component
:
InspectPlanComponent
},
{
path
:
'inspectPlan'
,
component
:
InspectPlanComponent
},
{
path
:
'assetPart'
,
component
:
AssetPartComponent
},
{
path
:
'assetPart'
,
component
:
AssetPartComponent
},
{
path
:
'assetChild'
,
component
:
ChildAssetsComponent
},
{
path
:
'assetDetail'
,
component
:
AssetsDetailComponent
},
]
]
},
},
]
]
...
...
src/main/webapp/app/work/asset-part/asset-part.component.html
View file @
c19c7258
...
@@ -33,8 +33,8 @@
...
@@ -33,8 +33,8 @@
<button
nz-button
nzType=
"default"
><i
class=
"anticon anticon-plus"
></i>
下载
</button>
<button
nz-button
nzType=
"default"
><i
class=
"anticon anticon-plus"
></i>
下载
</button>
</div>
</div>
<div
nz-col
nzSpan=
"6"
>
<div
nz-col
nzSpan=
"6"
>
<button
nz-button
nzType=
"default"
><i
class=
"anticon anticon-plus"
></i>
添加
</button>
<button
(
click
)="
showAddModal
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-plus"
></i>
添加
</button>
<button
nz-button
nzType=
"default"
><i
class=
"anticon anticon-plus"
></i>
编辑
</button>
<button
(
click
)="
showAEditModal
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-plus"
></i>
编辑
</button>
<button
nz-button
nzType=
"default"
><i
class=
"anticon anticon-plus"
></i>
删除
</button>
<button
nz-button
nzType=
"default"
><i
class=
"anticon anticon-plus"
></i>
删除
</button>
</div>
</div>
</div>
</div>
...
@@ -74,9 +74,12 @@
...
@@ -74,9 +74,12 @@
</td>
</td>
<td>
关联事件
</td>
<td>
关联事件
</td>
<td
class=
"handle text-center"
>
<td
class=
"handle text-center"
>
<span
(
click
)="
goToChild
(
data
)"
>
明细
</span>
<span
(
click
)="
showEditModal
(
data
)"
>
编辑
</span>
<span
(
click
)="
showEditModal
(
data
)"
>
编辑
</span>
<span
(
click
)="
deleteSend
(
data
)"
>
删除
</span>
<span
(
click
)="
deleteSend
(
data
)"
>
删除
</span>
</td>
</td>
</tr>
</tr>
</tbody>
</tbody>
</nz-table>
</nz-table>
\ No newline at end of file
<smart-type-asets
#
smartTypeAsets
></smart-type-asets>
\ No newline at end of file
src/main/webapp/app/work/asset-part/asset-part.component.ts
View file @
c19c7258
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
WorkService
}
from
'../work.service'
;
import
{
WorkService
}
from
'../work.service'
;
import
{
pageSize
}
from
'../../app.constants'
;
import
{
pageSize
}
from
'../../app.constants'
;
import
{
Router
}
from
'@angular/router'
;
import
{
TypeAsetsComponent
}
from
'../modal/type-asets/type-asets.component'
;
@
Component
({
@
Component
({
selector
:
'smart-asset-part'
,
selector
:
'smart-asset-part'
,
...
@@ -8,6 +10,7 @@ import {pageSize} from '../../app.constants';
...
@@ -8,6 +10,7 @@ import {pageSize} from '../../app.constants';
styles
:
[]
styles
:
[]
})
})
export
class
AssetPartComponent
implements
OnInit
{
export
class
AssetPartComponent
implements
OnInit
{
@
ViewChild
(
'smartTypeAsets'
)
smartTypeAsets
:
TypeAsetsComponent
;
timeFormat
=
'yyyy-MM-dd'
;
timeFormat
=
'yyyy-MM-dd'
;
parentList
;
parentList
;
...
@@ -28,7 +31,7 @@ export class AssetPartComponent implements OnInit {
...
@@ -28,7 +31,7 @@ export class AssetPartComponent implements OnInit {
startTime
:
''
,
startTime
:
''
,
endTime
:
''
,
endTime
:
''
,
};
};
constructor
(
private
workSer
:
WorkService
)
{
}
constructor
(
private
workSer
:
WorkService
,
private
router
:
Router
)
{
}
ngOnInit
()
{
ngOnInit
()
{
this
.
getList
();
this
.
getList
();
...
@@ -59,4 +62,21 @@ export class AssetPartComponent implements OnInit {
...
@@ -59,4 +62,21 @@ export class AssetPartComponent implements OnInit {
this
.
getList
();
this
.
getList
();
}
}
goToChild
(
data
){
this
.
router
.
navigate
([
'app/main/assetChild'
],
{
queryParams
:{
id
:
data
.
id
}
})
}
showAddModal
(){
this
.
smartTypeAsets
.
showAddModal
(
"新增分类"
);
}
showAEditModal
(){
this
.
smartTypeAsets
.
showEditModal
(
"编辑分类"
);
}
}
}
src/main/webapp/app/work/asset-part/child-assets/child-assets.component.ts
View file @
c19c7258
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
WorkService
}
from
'../../work.service'
;
import
{
ActivatedRoute
,
Router
}
from
'@angular/router'
;
@
Component
({
@
Component
({
selector
:
'smart-child-assets'
,
selector
:
'smart-child-assets'
,
...
@@ -7,9 +9,22 @@ import { Component, OnInit } from '@angular/core';
...
@@ -7,9 +9,22 @@ import { Component, OnInit } from '@angular/core';
})
})
export
class
ChildAssetsComponent
implements
OnInit
{
export
class
ChildAssetsComponent
implements
OnInit
{
constructor
()
{
}
childId
;
constructor
(
private
workSer
:
WorkService
,
private
routerInfo
:
ActivatedRoute
)
{
this
.
routerInfo
.
queryParams
.
subscribe
(
(
res
)
=>
{
this
.
childId
=
res
.
id
;
}
)
}
ngOnInit
()
{
ngOnInit
()
{
this
.
getList
();
}
}
getList
(){
// this.workSer.create()
}
}
}
src/main/webapp/app/work/modal/type-asets/type-asets.component.html
View file @
c19c7258
...
@@ -3,35 +3,29 @@
...
@@ -3,35 +3,29 @@
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSm
]="
6
"
[
nzXs
]="
24
"
nzRequired
nzFor=
"name"
>
分类类型
</nz-form-label>
<nz-form-label
[
nzSm
]="
6
"
[
nzXs
]="
24
"
nzRequired
nzFor=
"name"
>
分类类型
</nz-form-label>
<nz-form-control
[
nzSm
]="
14
"
[
nzXs
]="
24
"
>
<nz-form-control
[
nzSm
]="
14
"
[
nzXs
]="
24
"
>
<nz-tag
nzMode=
"checkable"
[
nzChecked
]="
true
"
(
nzCheckedChange
)="
checkChange
($
event
)"
>
Tag1
</nz-tag>
<nz-tag
nzMode=
"checkable"
[
nzChecked
]="
true
"
(
nzCheckedChange
)="
checkChange
($
event
)"
>
父分类
</nz-tag>
<nz-tag
nzMode=
"checkable"
[
nzChecked
]="
true
"
(
nzCheckedChange
)="
checkChange
($
event
)"
>
Tag2
</nz-tag>
<nz-tag
nzMode=
"checkable"
[
nzChecked
]="
true
"
(
nzCheckedChange
)="
checkChange
($
event
)"
>
子分类
</nz-tag>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSm
]="
6
"
[
nzXs
]="
24
"
nzFor=
"status"
nzRequired
nzFor=
"
status
"
>
分类名称
</nz-form-label>
<nz-form-label
[
nzSm
]="
6
"
[
nzXs
]="
24
"
nzFor=
"status"
nzRequired
nzFor=
"
name
"
>
分类名称
</nz-form-label>
<nz-form-control
[
nzSm
]="
14
"
[
nzXs
]="
24
"
>
<nz-form-control
[
nzSm
]="
14
"
[
nzXs
]="
24
"
>
<nz-select
id=
"status"
nzPlaceHolder=
"选择状态"
formControlName=
"status"
>
<input
type=
"text"
nz-input
formControlName=
"name"
name=
"name"
id=
"name"
>
<nz-option
nzValue=
"0"
nzLabel=
"有效"
></nz-option>
<nz-form-explain
*
ngIf=
"validateForm.get('name').dirty && validateForm.get('name').errors"
>
请选择分类名称!
</nz-form-explain>
<nz-option
nzValue=
"1"
nzLabel=
"无效"
></nz-option>
</nz-select>
<nz-form-explain
*
ngIf=
"validateForm.get('status').dirty && validateForm.get('status').errors"
>
请选择是否有效!
</nz-form-explain>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSm
]="
6
"
[
nzXs
]="
24
"
nzFor=
"status"
nzRequired
nzFor=
"status"
>
分类编号
</nz-form-label>
<nz-form-label
[
nzSm
]="
6
"
[
nzXs
]="
24
"
nzFor=
"status"
nzRequired
nzFor=
"status"
>
分类编号
</nz-form-label>
<nz-form-control
[
nzSm
]="
14
"
[
nzXs
]="
24
"
>
<nz-form-control
[
nzSm
]="
14
"
[
nzXs
]="
24
"
>
<nz-select
id=
"status"
nzPlaceHolder=
"选择状态"
formControlName=
"status"
>
<input
type=
"text"
nz-input
formControlName=
"name"
name=
"typeno"
id=
"typeno"
>
<nz-option
nzValue=
"0"
nzLabel=
"有效"
></nz-option>
<nz-form-explain
*
ngIf=
"validateForm.get('typeno').dirty && validateForm.get('typeno').errors"
>
请选择分类编号!
</nz-form-explain>
<nz-option
nzValue=
"1"
nzLabel=
"无效"
></nz-option>
</nz-select>
<nz-form-explain
*
ngIf=
"validateForm.get('status').dirty && validateForm.get('status').errors"
>
请选择是否有效!
</nz-form-explain>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSm
]="
6
"
[
nzXs
]="
24
"
nzRequired
nzFor=
"
comments
"
>
分类描述
</nz-form-label>
<nz-form-label
[
nzSm
]="
6
"
[
nzXs
]="
24
"
nzRequired
nzFor=
"
tyoeDescribe
"
>
分类描述
</nz-form-label>
<nz-form-control
[
nzSm
]="
14
"
[
nzXs
]="
24
"
>
<nz-form-control
[
nzSm
]="
14
"
[
nzXs
]="
24
"
>
<textarea
id=
"
comments"
row=
"4"
nz-input
formControlName=
"comments
"
></textarea>
<textarea
id=
"
tyoeDescribe"
row=
"4"
nz-input
formControlName=
"tyoeDescribe
"
></textarea>
<nz-form-explain
*
ngIf=
"validateForm.get('
comments').dirty && validateForm.get('comments').errors"
>
请输入角色说明
!
</nz-form-explain>
<nz-form-explain
*
ngIf=
"validateForm.get('
tyoeDescribe').dirty && validateForm.get('tyoeDescribe').errors"
>
请输入分类描述
!
</nz-form-explain>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
</form>
</form>
...
...
src/main/webapp/app/work/modal/type-asets/type-asets.component.ts
View file @
c19c7258
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
timeEnd
}
from
'@ngtools/webpack/src/benchmark'
;
import
{
timeEnd
}
from
'@ngtools/webpack/src/benchmark'
;
import
{
FormBuilder
,
FormGroup
}
from
'@angular/forms'
;
@
Component
({
@
Component
({
selector
:
'smart-type-asets'
,
selector
:
'smart-type-asets'
,
...
@@ -10,11 +11,28 @@ export class TypeAsetsComponent implements OnInit {
...
@@ -10,11 +11,28 @@ export class TypeAsetsComponent implements OnInit {
title
;
title
;
isVisible
;
isVisible
;
validateForm
:
FormGroup
;
constructor
(
private
fb
:
FormBuilder
)
{
}
checkChange
(){
constructor
()
{
}
}
ngOnInit
()
{
ngOnInit
()
{
this
.
initForm
();
}
initForm
(){
this
.
validateForm
=
this
.
fb
.
group
(
{
parentid
:[
null
],
name
:[
null
],
typeno
:[
null
],
tyoeDescribe
:[
null
],
}
)
}
}
showAddModal
(
title
)
{
showAddModal
(
title
)
{
...
@@ -29,6 +47,13 @@ export class TypeAsetsComponent implements OnInit {
...
@@ -29,6 +47,13 @@ export class TypeAsetsComponent implements OnInit {
handleCancel
()
{
handleCancel
()
{
this
.
isVisible
=
false
;
this
.
isVisible
=
false
;
for
(
let
i
in
this
.
validateForm
.
controls
){
this
.
validateForm
.
controls
[
i
].
markAsDirty
();
this
.
validateForm
.
controls
[
i
].
updateValueAndValidity
();
}
if
(
this
.
validateForm
.
invalid
){
return
false
;
}
}
}
handleOk
()
{
handleOk
()
{
...
...
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