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
a760ac07
Commit
a760ac07
authored
Dec 16, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
workService
parent
bc573ca1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
276 additions
and
42 deletions
+276
-42
asset-part.component.ts
src/main/webapp/app/work/asset-part/asset-part.component.ts
+2
-0
link-inventory.component.html
...p/work/modal/link-inventory/link-inventory.component.html
+41
-3
link-inventory.component.ts
...app/work/modal/link-inventory/link-inventory.component.ts
+126
-12
handle-event.component.html
...work/work-handle/handle-event/handle-event.component.html
+39
-22
handle-event.component.ts
...p/work/work-handle/handle-event/handle-event.component.ts
+67
-3
work.service.ts
src/main/webapp/app/work/work.service.ts
+1
-2
No files found.
src/main/webapp/app/work/asset-part/asset-part.component.ts
View file @
a760ac07
...
@@ -47,6 +47,7 @@ export class AssetPartComponent implements OnInit {
...
@@ -47,6 +47,7 @@ export class AssetPartComponent implements OnInit {
this
.
changeType
();
this
.
changeType
();
}
}
//父级分类
getList
(){
getList
(){
this
.
workSer
.
findByParentType
().
subscribe
(
this
.
workSer
.
findByParentType
().
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
...
@@ -59,6 +60,7 @@ export class AssetPartComponent implements OnInit {
...
@@ -59,6 +60,7 @@ export class AssetPartComponent implements OnInit {
)
)
}
}
//子级分类
changeType
(){
changeType
(){
this
.
workSer
.
findByParentidCount
(
this
.
obj
.
type
).
subscribe
(
this
.
workSer
.
findByParentidCount
(
this
.
obj
.
type
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
...
...
src/main/webapp/app/work/modal/link-inventory/link-inventory.component.html
View file @
a760ac07
<p>
<!--选择资产-->
link-inventory works!
<nz-modal
[
nzWidth
]="
1080
"
[(
nzVisible
)]="
isVisiable
"
[
nzTitle
]="
title
"
(
nzOnCancel
)="
handleEditCancel
()"
(
nzOnOk
)="
handEditleOk
()"
>
</p>
<div
nz-form
class=
"ant-advanced-search-form form-select"
>
<div
nz-row
[
nzGutter
]="
24
"
>
<div
nz-col
[
nzSpan
]="
8
"
>
<nz-tree
#
nzTree
name=
"nodes"
[(
ngModel
)]="
nodes
"
[
nzAsyncData
]="
true
"
[
nzCheckStrictly
]="
true
"
(
nzCheckBoxChange
)="
selectCheckTree
($
event
)"
(
nzClick
)="
mouseAction
('
click
',$
event
)"
(
nzExpandChange
)="
mouseAction
('
expand
',$
event
)"
>
</nz-tree>
</div>
<div
nz-col
[
nzSpan
]="
16
"
>
<nz-table
#
basicTable
[
nzData
]="
invertoryList
"
(
nzPageIndexChange
)="
refreshStatus
()"
(
nzPageSizeChange
)="
refreshStatus
()"
>
<thead>
<tr>
<th>
资产编号
</th>
<th>
资产分类
</th>
<th>
资产名称
</th>
<th
nzShowCheckbox
[(
nzChecked
)]="
allChecked
"
[
nzIndeterminate
]="
indeterminate
"
(
nzCheckedChange
)="
checkAll
($
event
)"
></th>
</tr>
</thead>
<tbody>
<tr
*
ngFor=
"let data of basicTable.data"
>
<td>
{{data.name}}
</td>
<td>
{{data.mobile}}
</td>
<td>
{{data.title}}
</td>
<td
nzShowCheckbox
[(
nzChecked
)]="
data
.
checked
"
(
nzCheckedChange
)="
selectItem
(
data
,$
event
)"
></td>
</tr>
</tbody>
</nz-table>
</div>
</div>
</div>
</nz-modal>
src/main/webapp/app/work/modal/link-inventory/link-inventory.component.ts
View file @
a760ac07
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
EventEmitter
,
OnInit
,
Output
}
from
'@angular/core'
;
import
{
WorkService
}
from
'../../work.service'
;
import
{
NzFormatEmitEvent
,
NzMessageService
,
NzTreeNode
}
from
'ng-zorro-antd'
;
@
Component
({
@
Component
({
selector
:
'smart-link-inventory'
,
selector
:
'smart-link-inventory'
,
templateUrl
:
'./link-inventory.component.html'
,
templateUrl
:
'./link-inventory.component.html'
,
styles
:
[]
styles
:
[]
})
})
export
class
LinkInventoryComponent
implements
OnInit
{
export
class
LinkInventoryComponent
implements
OnInit
{
@
Output
()
done
=
new
EventEmitter
<
any
>
();
title
title
;
isVisiable
=
false
;
isVisiable
=
false
;
constructor
()
{
}
invertoryList
;
ngOnInit
()
{
nodes
;
}
nodeList
;
selectList
=
[];
allChecked
;
indeterminate
;
showModal
(
title
){
constructor
(
private
workSer
:
WorkService
,
private
message
:
NzMessageService
)
{
this
.
isVisiable
=
true
;
this
.
title
=
title
;
}
}
checkAll
(
value
:
boolean
):
void
{
this
.
invertoryList
.
forEach
(
data
=>
data
.
checked
=
value
);
this
.
refreshStatus
();
}
refreshStatus
():
void
{
const
allChecked
=
this
.
invertoryList
.
every
(
value
=>
value
.
checked
===
true
);
const
allUnChecked
=
this
.
invertoryList
.
every
(
value
=>
!
value
.
checked
);
this
.
allChecked
=
allChecked
;
this
.
indeterminate
=
(
!
allChecked
)
&&
(
!
allUnChecked
);
}
selectItem
(
item
,
e
){
if
(
e
){
this
.
selectList
.
push
(
item
);
}
else
{
this
.
selectList
.
forEach
((
value
,
index
)
=>
{
if
(
value
.
id
==
item
.
id
){
this
.
selectList
.
splice
(
index
,
1
)
}
})
}
this
.
refreshStatus
();
}
ngOnInit
()
{
this
.
getList
();
}
toNode
(
data
)
{
this
.
nodes
=
data
.
map
(
res
=>
{
return
new
NzTreeNode
(
res
);
});
}
//父级分类
getList
()
{
this
.
workSer
.
findByParentType
().
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
let
option
=
res
.
data
;
option
.
forEach
(
res
=>
{
res
.
title
=
res
.
name
;
res
.
key
=
res
.
id
;
res
.
selectable
=
false
;
});
this
.
nodeList
=
option
;
this
.
toNode
(
option
);
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
}
);
}
//获取下级---子分类
mouseAction
(
name
:
string
,
event
:
NzFormatEmitEvent
)
{
if
(
name
==
"click"
){
this
.
selectCheckTree
(
event
);
}
else
{
const
index
=
<
any
>
event
.
node
.
key
-
1
;
const
pId
=
event
.
node
.
origin
.
id
;
this
.
workSer
.
findByParentidCount
(
pId
).
subscribe
(
(
res
)
=>
{
if
(
res
.
data
)
{
const
dataSet
=
res
.
data
;
dataSet
.
forEach
(
res
=>
{
res
.
title
=
res
.
name
;
res
.
key
=
res
.
id
;
res
.
isLeaf
=
true
;
});
event
.
node
.
addChildren
(
dataSet
);
this
.
nodeList
[
index
].
children
=
dataSet
;
this
.
nodeList
[
index
].
expanded
=
true
;
}
else
{
event
.
node
.
addChildren
([]);
// this.message.warning('该下级为空');
}
}
);
setTimeout
(
_
=>
{
},
1000
);
}
}
//选择树节点
selectCheckTree
(
event
:
NzFormatEmitEvent
)
{
const
cId
=
event
.
node
.
origin
.
id
;
this
.
workSer
.
findInventory
(
cId
).
subscribe
(
(
res
)
=>
{
this
.
invertoryList
=
res
.
data
;
}
);
}
showModal
(
title
)
{
this
.
isVisiable
=
true
;
this
.
title
=
title
;
}
handleEditCancel
(){
this
.
selectList
=
[];
this
.
isVisiable
=
false
;
}
handEditleOk
(){
this
.
isVisiable
=
false
;
this
.
done
.
emit
(
this
.
selectList
);
}
}
}
src/main/webapp/app/work/work-handle/handle-event/handle-event.component.html
View file @
a760ac07
...
@@ -24,12 +24,12 @@
...
@@ -24,12 +24,12 @@
</div>
</div>
<div
nz-row
>
<div
nz-row
>
<div
nz-col
nzSpan=
"12"
>
<div
nz-col
nzSpan=
"12"
>
<
p>
事件信息
</p
>
<
h2>
事件信息
</h2
>
<div
nz-row
>
<div
nz-row
>
<div
nz-col
nzSpan=
"5"
>
事件编号
</div>
<div
nz-col
nzSpan=
"5"
>
事件编号
</div>
<div
nz-col
nzSpan=
"7"
></div>
<div
nz-col
nzSpan=
"7"
></div>
<div
nz-col
nzSpan=
"5"
>
提交时间
</div>
<div
nz-col
nzSpan=
"5"
>
提交时间
</div>
<div
nz-col
nzSpan=
"7"
>
{{event.createTime | date:"yyyy-MM-dd HH:mm:ss"}}
</div>
<div
nz-col
nzSpan=
"7"
>
{{event
?
.createTime | date:"yyyy-MM-dd HH:mm:ss"}}
</div>
</div>
</div>
<div
nz-row
>
<div
nz-row
>
<div
nz-col
nzSpan=
"5"
>
请求人
</div>
<div
nz-col
nzSpan=
"5"
>
请求人
</div>
...
@@ -51,46 +51,62 @@
...
@@ -51,46 +51,62 @@
<div
nz-col
nzSpan=
"7"
>
{{event?.file}}
</div>
<div
nz-col
nzSpan=
"7"
>
{{event?.file}}
</div>
</div>
</div>
<p>
流转记录
</p>
<h2>
流转记录
</h2>
<div
nz-row
>
<ng-container
*
ngFor=
"let item of transforsList;"
>
<div
nz-col
nzSpan=
"5"
>
请求人
</div>
<div
nz-row
>
<div
nz-col
nzSpan=
"7"
></div>
<div
nz-col
nzSpan=
"5"
>
{{item.requesterName}}
</div>
<div
nz-col
nzSpan=
"7"
></div>
<div
nz-col
nzSpan=
"7"
>
转派给{{item.operatorInfo[1]}}
</div>
</div>
</div>
<div
nz-row
>
</ng-container>
<div
nz-col
nzSpan=
"5"
>
请求人
</div>
<div
nz-col
nzSpan=
"7"
></div>
<div
nz-col
nzSpan=
"7"
></div>
</div>
<div
nz-row
>
<div
nz-row
>
<div
nz-col
nzSpan=
"5"
>
无法处理,我要转派
</div>
<div
nz-col
nzSpan=
"7"
>
无法处理,我要转派
</div>
<div
nz-col
nzSpan=
"7"
><button
(
click
)="
selectPerson
()"
nz-button
><span>
选择
</span></button></div>
<div
nz-col
nzSpan=
"5"
><button
(
click
)="
showTransforModal
()"
nz-button
><span>
转派
</span></button></div>
<div
nz-col
nzSpan=
"7"
></div>
</div>
</div>
</div>
</div>
<div
nz-col
nzSpan=
"12"
>
<div
nz-col
nzSpan=
"12"
>
<
p>
已解决,填写处理结果
</p
>
<
h2>
已解决,填写处理结果
</h2
>
<div
nz-row
>
<div
nz-row
>
<div
nz-col
nzSpan=
"5"
>
处理结果
</div>
<div
nz-col
nzSpan=
"5"
>
处理结果
</div>
<div
nz-col
nzSpan=
"19"
></div>
<div
nz-col
nzSpan=
"19"
>
<nz-radio-group
[(
ngModel
)]="
obj
.
operateStatus
"
>
<label
nz-radio
nzValue=
"0"
>
未解决
</label>
<label
nz-radio
nzValue=
"1"
>
部分解决
</label>
<label
nz-radio
nzValue=
"2"
>
已解决
</label>
</nz-radio-group>
</div>
</div>
</div>
<div
nz-row
>
<div
nz-row
>
<div
nz-col
nzSpan=
"5"
>
完成时间
</div>
<div
nz-col
nzSpan=
"5"
>
完成时间
</div>
<div
nz-col
nzSpan=
"19"
></div>
<div
nz-col
nzSpan=
"19"
>
<nz-date-picker
[(
ngModel
)]="
date
"
nzFormat=
"yyyy-MM-dd"
></nz-date-picker>
<nz-time-picker
[(
ngModel
)]="
time
"
></nz-time-picker>
</div>
</div>
</div>
<div
nz-row
>
<div
nz-row
>
<div
nz-col
nzSpan=
"5"
>
关联资产
</div>
<div
nz-col
nzSpan=
"5"
>
关联资产
</div>
<div
nz-col
nzSpan=
"19"
>
<div
nz-col
nzSpan=
"19"
>
<button
(
click
)="
showInventoryModal
()"
nz-button
><span>
选择
</span></button>
<button
(
click
)="
showInventoryModal
()"
nz-button
><span>
选择
</span></button>
<p
*
ngFor=
"let item of linkList;"
>
<span>
资产编号
</span>
<span>
{{item.name}}
</span>
<span>
{{item.typeName}}
</span>
</p>
</div>
</div>
</div>
</div>
<div
nz-row
>
<div
nz-row
>
<div
nz-col
nzSpan=
"5"
>
处理情况
</div>
<div
nz-col
nzSpan=
"5"
>
处理情况
</div>
<div
nz-col
nzSpan=
"19"
>
<div
nz-col
nzSpan=
"19"
>
<textarea
id=
"tyoeDescribe"
row=
"4"
nz-input
></textarea>
<textarea
[(
ngModel
)]="
obj
.
operateResult
"
id=
"tyoeDescribe"
row=
"4"
nz-input
></textarea>
</div>
</div>
</div>
</div>
<p>
<button
(
click
)="
save
()"
nz-button
><span>
确定
</span></button>
</p>
</div>
</div>
</div>
</div>
<smart-link-inventory
#
smartLinkInventory
></smart-link-inventory>
<!--关联资产-->
<smart-link-inventory
#
smartLinkInventory
(
done
)="
setLink
($
event
)"
></smart-link-inventory>
<!--转派-->
<smart-transfor
#
smartTransfor
(
done
)="
success
($
event
)"
></smart-transfor>
\ No newline at end of file
src/main/webapp/app/work/work-handle/handle-event/handle-event.component.ts
View file @
a760ac07
...
@@ -3,20 +3,42 @@ import {ActivatedRoute} from '@angular/router';
...
@@ -3,20 +3,42 @@ import {ActivatedRoute} from '@angular/router';
import
{
WorkService
}
from
'../../work.service'
;
import
{
WorkService
}
from
'../../work.service'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
import
{
LinkInventoryComponent
}
from
'../../modal/link-inventory/link-inventory.component'
;
import
{
LinkInventoryComponent
}
from
'../../modal/link-inventory/link-inventory.component'
;
import
{
DatePipe
}
from
'@angular/common'
;
import
{
TransforComponent
}
from
'../../modal/transfor/transfor.component'
;
@
Component
({
@
Component
({
selector
:
'smart-handle-event'
,
selector
:
'smart-handle-event'
,
templateUrl
:
'./handle-event.component.html'
,
templateUrl
:
'./handle-event.component.html'
,
styles
:
[]
styles
:
[
`
:host ::ng-deep .ant-row{
margin: 20px 0;
}
h2{
font-weight: 400;
}
`
]
})
})
export
class
HandleEventComponent
implements
OnInit
{
export
class
HandleEventComponent
implements
OnInit
{
@
ViewChild
(
'smartLinkInventory'
)
smartLinkInventory
:
LinkInventoryComponent
;
@
ViewChild
(
'smartLinkInventory'
)
smartLinkInventory
:
LinkInventoryComponent
;
@
ViewChild
(
'smartTransfor'
)
smartTransfor
:
TransforComponent
;
eventId
;
eventId
;
event
;
event
;
transforsList
;
linkList
;
format
;
obj
=
{
operateStatus
:
null
,
operateResult
:
null
,
};
date
;
time
;
constructor
(
private
routrInfo
:
ActivatedRoute
,
private
workSer
:
WorkService
,
constructor
(
private
routrInfo
:
ActivatedRoute
,
private
workSer
:
WorkService
,
private
message
:
NzMessageService
)
{
private
message
:
NzMessageService
,
private
datePipe
:
DatePipe
)
{
this
.
routrInfo
.
queryParams
.
subscribe
(
this
.
routrInfo
.
queryParams
.
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
eventId
=
res
.
eventId
;
this
.
eventId
=
res
.
eventId
;
...
@@ -42,7 +64,10 @@ export class HandleEventComponent implements OnInit {
...
@@ -42,7 +64,10 @@ export class HandleEventComponent implements OnInit {
findTransferAndInventory
(){
findTransferAndInventory
(){
this
.
workSer
.
findTransferAndInventory
(
this
.
eventId
).
subscribe
(
this
.
workSer
.
findTransferAndInventory
(
this
.
eventId
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
transforsList
=
res
.
data
.
transfers
;
this
.
transforsList
.
forEach
(
e
=>
{
e
.
operatorInfo
=
e
.
operatorInfo
.
replace
(
/
\"
/g
,
""
).
replace
(
"{"
,
""
).
replace
(
"}"
,
""
).
split
(
":"
);
})
}
}
)
)
}
}
...
@@ -51,8 +76,47 @@ export class HandleEventComponent implements OnInit {
...
@@ -51,8 +76,47 @@ export class HandleEventComponent implements OnInit {
}
}
//选择关联弹窗
showInventoryModal
(){
showInventoryModal
(){
this
.
smartLinkInventory
.
showModal
(
"添加关联资产"
);
this
.
smartLinkInventory
.
showModal
(
"添加关联资产"
);
}
}
//选择管理返回值
setLink
(
e
){
console
.
log
(
e
);
this
.
linkList
=
e
;
}
//保存处理
save
(){
const
data
=
{
id
:
this
.
eventId
,
operateStatus
:
Number
(
this
.
obj
.
operateStatus
),
inventoryId
:
this
.
linkList
.
map
(
e
=>
{
return
e
.
id
;
}),
operateResult
:
this
.
obj
.
operateResult
,
completeTimeStr
:
this
.
datePipe
.
transform
(
this
.
date
,
"yyyy-MM-dd"
)
+
" "
+
this
.
datePipe
.
transform
(
this
.
time
,
"HH:mm:ss"
)
}
this
.
workSer
.
deal
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
this
.
message
.
success
(
"事件处理成功"
);
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
}
)
}
//转派
showTransforModal
(){
this
.
smartTransfor
.
showTransforModal
(
"事件转派"
,
this
.
eventId
);
}
//转派成功
success
(
e
){
}
}
}
src/main/webapp/app/work/work.service.ts
View file @
a760ac07
...
@@ -20,7 +20,6 @@ export class WorkService {
...
@@ -20,7 +20,6 @@ export class WorkService {
}
}
//删除事件
//删除事件
//删除事件
deleteEvent
(
data
):
Observable
<
any
>
{
deleteEvent
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/sysevent/delete'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/sysevent/delete'
,
data
);
}
}
...
@@ -47,7 +46,7 @@ export class WorkService {
...
@@ -47,7 +46,7 @@ export class WorkService {
//处理事件
//处理事件
deal
(
data
):
Observable
<
any
>
{
deal
(
data
):
Observable
<
any
>
{
return
this
.
http
.
p
os
t
(
SERVER_API_URL
+
'/sysevent/deal'
,
data
);
return
this
.
http
.
p
u
t
(
SERVER_API_URL
+
'/sysevent/deal'
,
data
);
}
}
//查询事件, 操作人, 流转记录, 资产
//查询事件, 操作人, 流转记录, 资产
...
...
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