Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-convertor-view
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
station
amos-convertor-view
Commits
340a4d6d
Commit
340a4d6d
authored
Jun 12, 2020
by
xinglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
0267a1ae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
40 deletions
+43
-40
FireTruckDetailInfo.js
...mentLedger/FireResources/FireTruck/FireTruckDetailInfo.js
+6
-1
FireStationMatches.js
...Ledger/FireResources/matchEquipment/FireStationMatches.js
+37
-39
No files found.
src/view/bizview/equipmentLedger/FireResources/FireTruck/FireTruckDetailInfo.js
View file @
340a4d6d
...
...
@@ -93,7 +93,12 @@ class FireTruckDetailInfo extends Component {
};
goBack() {
browserHistory.goBack();
let path = {
pathname: '
/
biz
/
fireresource
',
state: { activeKey: '
1
' }
};
browserHistory.push(path);
//browserHistory.goBack();
}
fireTruckTableColumns = () => {
...
...
src/view/bizview/equipmentLedger/FireResources/matchEquipment/FireStationMatches.js
View file @
340a4d6d
...
...
@@ -114,24 +114,24 @@ class FireStationMatches extends Component {
pageNumber
:
0
,
pageSize
:
10
},
this
.
state
=
{
key
:
1
,
pagination
:
true
,
selectedRows
:
[],
selectedRowKeys
:
[],
dataList
:
[],
//表格数据集合
size
:
'small'
,
//表格大小
searchParam
:
[],
totals
:
0
,
//所有数据总和
requestParam
:
[],
fireStationId
:
0
,
equipmentName
:
'设备名称'
,
//设备名称
equipmentCode
:
'设备编号'
,
//设备编号
pictureMap
:
new
Map
(),
//设备相关图片
enableCarousel
:
false
,
//是否打开轮播图页面
enableAddOp
:
false
,
//是否打开绑定装备页面
type
:
''
,
};
this
.
state
=
{
key
:
1
,
pagination
:
true
,
selectedRows
:
[],
selectedRowKeys
:
[],
dataList
:
[],
//表格数据集合
size
:
'small'
,
//表格大小
searchParam
:
[],
totals
:
0
,
//所有数据总和
requestParam
:
[],
fireStationId
:
0
,
equipmentName
:
'设备名称'
,
//设备名称
equipmentCode
:
'设备编号'
,
//设备编号
pictureMap
:
new
Map
(),
//设备相关图片
enableCarousel
:
false
,
//是否打开轮播图页面
enableAddOp
:
false
,
//是否打开绑定装备页面
type
:
''
,
};
}
componentWillMount
()
{
...
...
@@ -166,14 +166,14 @@ class FireStationMatches extends Component {
param
.
pageNumber
=
param
.
current
;
}
Object
.
assign
(
searchParam
,
{
...
param
});
if
(
type
===
'fireStation'
)
{
if
(
type
===
'fireStation'
)
{
getMatchesFireEquipmentListAction
(
searchParam
,
fireStationId
,
searchParam
.
pageNumber
,
searchParam
.
pageSize
).
then
(
data
=>
{
this
.
setState
({
dataList
:
data
.
content
,
totalCount
:
data
.
totalElements
});
});
}
else
if
(
type
===
'waterResource'
)
{
}
else
if
(
type
===
'waterResource'
)
{
getMatchesWaterResourceBindEquipListAction
(
searchParam
,
fireStationId
,
searchParam
.
pageNumber
,
searchParam
.
pageSize
).
then
(
data
=>
{
this
.
setState
({
dataList
:
data
.
content
,
...
...
@@ -244,11 +244,11 @@ class FireStationMatches extends Component {
let
deleteObj
=
[];
for
(
let
i
=
0
;
i
<
selectedRowKeys
.
length
;
i
++
)
{
let
obj
=
{};
type
===
'fireStation'
?
obj
.
fireStationId
=
fireStationId
:
obj
.
waterResourceId
=
fireStationId
;
type
===
'fireStation'
?
obj
.
fireStationId
=
fireStationId
:
obj
.
waterResourceId
=
fireStationId
;
obj
.
fireEquipmentId
=
selectedRowKeys
[
i
];
deleteObj
.
push
(
obj
);
}
if
(
type
===
'fireStation'
)
{
if
(
type
===
'fireStation'
)
{
deleteFireStationMatchesAction
(
deleteObj
).
then
(
data
=>
{
AmosAlert
.
success
(
'提示'
,
'删除成功'
);
...
...
@@ -258,7 +258,7 @@ class FireStationMatches extends Component {
AmosAlert
.
error
(
'错误'
,
err
);
}
);
}
else
if
(
type
===
'waterResource'
)
{
}
else
if
(
type
===
'waterResource'
)
{
deleteWaterResourceBindEquipMatchesAction
(
deleteObj
).
then
(
data
=>
{
AmosAlert
.
success
(
'提示'
,
'删除成功'
);
...
...
@@ -303,20 +303,21 @@ class FireStationMatches extends Component {
for
(
let
i
=
0
;
i
<
selectedRowKeys
.
length
;
i
++
)
{
let
obj
=
{};
type
===
'fireStation'
?
obj
.
fireStationId
=
fireStationId
:
obj
.
waterResourceId
=
fireStationId
;
type
===
'fireStation'
?
obj
.
fireStationId
=
fireStationId
:
obj
.
waterResourceId
=
fireStationId
;
obj
.
fireEquipmentId
=
selectedRowKeys
[
i
];
obj
.
number
=
numberInStation
[
obj
.
fireEquipmentId
]
?
numberInStation
[
obj
.
fireEquipmentId
]
:
1
;
obj
.
unit
=
unitInStation
[
obj
.
fireEquipmentId
];
bindObj
.
push
(
obj
);
}
if
(
bindObj
.
length
>
0
)
{
if
(
type
===
'fireStation'
)
{
if
(
type
===
'fireStation'
)
{
bindFireStationMatchesAction
(
bindObj
).
then
(
data
=>
{
if
(
data
.
result
===
'SUCCESS'
){
AmosAlert
.
success
(
'提示'
,
'添加装备成功'
);
}
else
if
(
data
.
result
===
'FAILURE'
){
console
.
log
(
data
);
if
(
data
.
result
===
'FAILURE'
)
{
AmosAlert
.
error
(
'错误'
,
data
.
message
);
}
else
{
AmosAlert
.
success
(
'提示'
,
'添加装备成功'
);
}
this
.
state
.
reload
();
},
...
...
@@ -324,7 +325,7 @@ class FireStationMatches extends Component {
AmosAlert
.
error
(
'错误'
,
err
||
'添加装备失败'
);
}
);
}
else
if
(
type
===
'waterResource'
)
{
}
else
if
(
type
===
'waterResource'
)
{
waterResourcebindEquipMatchesAction
(
bindObj
).
then
(
data
=>
{
AmosAlert
.
success
(
'提示'
,
'添加装备成功'
);
...
...
@@ -336,15 +337,12 @@ class FireStationMatches extends Component {
);
}
}
else
{
}
else
{
AmosAlert
.
error
(
'错误'
,
'请添加装备!'
);
// this.setState({
// enableAddOp: false
// });
}
this
.
setState
({
enableAddOp
:
false
});
}
render
()
{
...
...
@@ -365,12 +363,12 @@ class FireStationMatches extends Component {
/
>
<
div
className
=
'match-equipment-toolbar'
>
<
div
className
=
'match-equipment-toolbar-goback'
>
<
Button
icon
=
{
<
BizIcon
icon
=
"fanhui"
/>
}
transparent
onClick
=
{()
=>
this
.
goBack
()}
/
>
<
Button
icon
=
{
<
BizIcon
icon
=
"fanhui"
/>
}
transparent
onClick
=
{()
=>
this
.
goBack
()}
/
>
<
/div
>
<
div
className
=
'match-equipment-toolbar-title'
>
{
equipmentHeaderResult
(
fireStation
)}
<
/div
>
<
div
className
=
'match-equipment-toolbar-oper'
>
<
Button
icon
=
{
<
BizIcon
icon
=
"tianjia"
/>
}
transparent
onClick
=
{()
=>
this
.
add
()}
/
>
<
Button
icon
=
{
<
BizIcon
icon
=
"shanchu"
/>
}
transparent
onClick
=
{()
=>
this
.
delete
()}
/
>
<
Button
icon
=
{
<
BizIcon
icon
=
"tianjia"
/>
}
transparent
onClick
=
{()
=>
this
.
add
()}
/
>
<
Button
icon
=
{
<
BizIcon
icon
=
"shanchu"
/>
}
transparent
onClick
=
{()
=>
this
.
delete
()}
/
>
<
/div
>
<
/div
>
<
div
className
=
'match-equipment-content'
>
...
...
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