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
0bf14fc7
Commit
0bf14fc7
authored
Jul 12, 2021
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
59aeed9e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
29 deletions
+33
-29
EquipmentFireEquipmentAdd.js
...ew/equipmentLedger/Equipment/EquipmentFireEquipmentAdd.js
+33
-29
No files found.
src/view/bizview/equipmentLedger/Equipment/EquipmentFireEquipmentAdd.js
View file @
0bf14fc7
...
...
@@ -4,11 +4,11 @@ import { Input } from 'amos-framework';
import
{
TreeSelect
}
from
'amos-antd'
;
import
AmosGridTable
from
'./../../common/tableComponent/table/AmosGridTable'
;
// import { getFireEquipmentListAction } from './../../../../services/ledgerService';
import
{
getFiltersAction
,
getFireEquipmentListsActionV2
}
from
'./../../../../services/ledgerService'
;
import
{
getFiltersAction
,
getFireEquipmentListsActionV2
}
from
'./../../../../services/ledgerService'
;
import
EditableCell
from
'./../../common/editableCell/EditableCell'
;
import
'../index.scss'
;
const
fireEquipmentTableColumns
=
self
=>
{
const
fireEquipmentTableColumns
=
(
self
)
=>
{
return
[
{
title
:
'序号'
,
...
...
@@ -68,8 +68,8 @@ const fireEquipmentTableColumns = self => {
dataIndex
:
'single'
,
key
:
'single'
,
width
:
'10%'
,
render
:
(
text
,
record
,
index
)
=>
<
EditableCell
value
=
{
text
}
num
=
{
record
.
amount
}
onChange
=
{(
text
)
=>
self
.
onCellChange
(
record
,
text
,
index
)}
/
>
render
:
(
text
,
record
,
index
)
=>
<
EditableCell
value
=
{
text
}
num
=
{
record
.
amount
}
onChange
=
{
text
=>
self
.
onCellChange
(
record
,
text
,
index
)}
/
>
}
];
};
...
...
@@ -92,18 +92,18 @@ class EquipmentFireEquipmentAdd extends Component {
pagination
:
true
,
selectedRows
:
[],
selectedRowKeys
:
[],
dataList
:
[],
//表格数据集合
size
:
'small'
,
//表格大小
dataList
:
[],
//
表格数据集合
size
:
'small'
,
//
表格大小
searchParam
:
{
equipClassify
:
'0,1,2,3'
},
totals
:
0
,
//所有数据总和
totals
:
0
,
//
所有数据总和
requestParam
:
[],
showDetail
:
true
,
//是否显示详情
truckId
:
0
,
//消防车id
enableConfig
:
false
,
//是否打开配置监测点页面
numberInStation
:
1
,
//添加设备数量
unitInStation
:
''
,
//
添加设备单位
fireEquipmentId
:
0
,
//设备ID
filterData
:
[]
//装备9大类
showDetail
:
true
,
//
是否显示详情
truckId
:
0
,
//
消防车id
enableConfig
:
false
,
//
是否打开配置监测点页面
numberInStation
:
1
,
//
添加设备数量
unitInStation
:
''
,
//
添加设备单位
fireEquipmentId
:
0
,
//
设备ID
filterData
:
[]
//
装备9大类
};
}
...
...
@@ -121,6 +121,7 @@ class EquipmentFireEquipmentAdd extends Component {
searchParam
.
equipmentId
=
value
;
searchParam
.
pageNumber
=
this
.
pageConfig
.
pageNumber
;
searchParam
.
pageSize
=
this
.
pageConfig
.
pageSize
;
searchParam
.
type
=
true
;
// 此处true表示的是模糊查询功能
this
.
setState
({
searchParam
},
()
=>
this
.
getFireEquipmentListData
(
searchParam
));
...
...
@@ -137,7 +138,7 @@ class EquipmentFireEquipmentAdd extends Component {
},
()
=>
this
.
getFireEquipmentListData
(
searchParam
));
};
onCellChange
=
(
record
,
text
,
index
)
=>
{
onCellChange
=
(
record
,
text
,
index
)
=>
{
// if ( text !== ''){
// const { dataList } = this.state;
// dataList[index].amount = text;
...
...
@@ -157,19 +158,22 @@ class EquipmentFireEquipmentAdd extends Component {
});
};
getFilter
=
()
=>
{
getFiltersAction
().
then
(
filterData
=>
{
filterData
=
this
.
formatterCategory
(
filterData
);
getFilter
=
()
=>
{
getFiltersAction
().
then
(
(
filterData
)
=>
{
filterData
=
this
.
formatterCategory
(
filterData
);
this
.
setState
({
filterData
});
});
}
getFireEquipmentListData
=
param
=>
{
getFireEquipmentListData
=
(
param
)
=>
{
const
{
searchParam
}
=
this
.
state
;
if
(
param
.
current
!=
null
)
{
//前端的current 即后端的pageNumber
//
前端的current 即后端的pageNumber
param
.
pageNumber
=
param
.
current
;
}
if
(
param
.
type
)
{
param
.
pageNumber
=
0
;
}
Object
.
assign
(
searchParam
,
{
...
param
});
// getFireEquipmentListAction(searchParam, param.pageNumber, param.pageSize).then(data => {
// this.setState({
...
...
@@ -177,7 +181,7 @@ class EquipmentFireEquipmentAdd extends Component {
// totalCount: data.totalElements
// });
// });
getFireEquipmentListsActionV2
(
searchParam
,
param
.
equipmentId
,
param
.
pageNumber
,
param
.
pageSize
).
then
(
data
=>
{
getFireEquipmentListsActionV2
(
searchParam
,
param
.
equipmentId
,
param
.
pageNumber
,
param
.
pageSize
).
then
(
(
data
)
=>
{
this
.
setState
({
dataList
:
data
.
content
,
totalCount
:
data
.
totalElements
...
...
@@ -226,7 +230,7 @@ class EquipmentFireEquipmentAdd extends Component {
/**
* 获取表格刷新方法
*/
reload
=
r
=>
{
reload
=
(
r
)
=>
{
this
.
setState
(
{
reload
:
()
=>
{
...
...
@@ -243,27 +247,27 @@ class EquipmentFireEquipmentAdd extends Component {
const
_true_
=
true
;
return
(
<
div
className
=
"equipment-fire-equipment"
style
=
{{
background
:
'#33333'
,
height
:
'100%'
}}
>
<
div
className
=
"equipment-fire-equipment-search"
>
<
div
className
=
'equipment-fire-equipment'
style
=
{{
background
:
'#33333'
,
height
:
'100%'
}}
>
<
div
className
=
'equipment-fire-equipment-search'
>
<
div
>
<
span
>
分类:
<
/span
>
<
TreeSelect
dropdownStyle
=
{{
maxHeight
:
400
,
overflow
:
'auto'
,
width
:
250
}}
treeData
=
{
filterData
}
placeholder
=
"请选择"
placeholder
=
'请选择'
treeDefaultExpandAll
allowClear
showSearch
treeNodeFilterProp
=
"title"
treeNodeFilterProp
=
'title'
filterTreeNode
=
{(
inputValue
,
treeNode
)
=>
treeNode
.
props
.
title
.
toLocaleLowerCase
().
includes
(
inputValue
.
toLocaleLowerCase
())}
onChange
=
{(
value
,
b
)
=>
this
.
onSelectChange
(
value
)}
onChange
=
{(
value
,
b
)
=>
this
.
onSelectChange
(
value
)}
/
>
{
/* <span>名称:</span> */
}
<
Input
value
=
{
name
}
onChange
=
{
e
=>
this
.
onChange
(
'name'
,
e
.
target
.
value
)}
placeholder
=
"按名称搜索"
/>
<
Input
value
=
{
name
}
onChange
=
{
e
=>
this
.
onChange
(
'name'
,
e
.
target
.
value
)}
placeholder
=
'按名称搜索'
/>
<
/div
>
<
/div
>
<
AmosGridTable
rowKey
=
"id"
rowKey
=
'id'
columns
=
{
fireEquipmentTableColumns
(
this
)}
callBack
=
{
this
.
reload
}
dataList
=
{
dataList
}
...
...
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