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
5d341be4
Commit
5d341be4
authored
Nov 04, 2020
by
zhengjiawei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重点设备配套设施调整
parent
f81c2c47
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
134 additions
and
98 deletions
+134
-98
urlConsts.js
src/consts/urlConsts.js
+4
-4
ledgerService.js
src/services/ledgerService.js
+23
-0
EquipmentFireEquipmentAdd.js
...ew/equipmentLedger/Equipment/EquipmentFireEquipmentAdd.js
+83
-74
MatchEquipment.js
src/view/bizview/equipmentLedger/Equipment/MatchEquipment.js
+16
-20
index.scss
src/view/bizview/equipmentLedger/index.scss
+8
-0
No files found.
src/consts/urlConsts.js
View file @
5d341be4
...
...
@@ -150,6 +150,7 @@ export const FasSerUrl = {
fireSourceListUrl
:
completePrefix
(
baseURI
,
'api/impEquip/list?pageNumber={page}&pageSize={size}'
),
//获取重点设备列表
fireEquipmentClassifyAllListUrl
:
completePrefix
(
baseURI
,
'api/firequment/point/listByType?equipClassify={equipClassify}'
),
//获取消防装备列表
fireEquipmentListUrl
:
completePrefix
(
baseURI
,
'api/fireSource/info/page?name={name}&code={code}&equipClassify={equipClassify}&pageNumber={page}&pageSize={size}&bindStation={bindStation}'
),
//获取消防装备列表
getFireEquipmentListstUrl
:
completePrefix
(
baseURI
,
'api/equipment/getEquipmentBySpe?name={name}&code={code}&pageNumber={page}&pageSize={size}&equipmentId={equipmentId}'
),
//新-获取消防装备列表
monitorPointListUrl
:
completePrefix
(
baseURI
,
'api/firequment/point/page?pageNumber={page}&pageSize={size}&type={type}&searchValue={searchValue}'
),
//获取消防装备已配置监测点位列表
monitorPointEditUrl
:
completePrefix
(
baseURI
,
'api/firequment/point'
),
//新增/更新消防装备监测点位
monitorPointDeleteUrl
:
completePrefix
(
baseURI
,
'api/firequment/point/batch/delete?pointIds={ids}'
),
//删除消防装备监测点位
...
...
@@ -157,7 +158,7 @@ export const FasSerUrl = {
monitorPointQryUpdateUrl
:
completePrefix
(
baseURI
,
'api/firequment/point/update'
),
//获取消防装备监测点位
equipmentListQryUrl
:
completePrefix
(
baseURI
,
'api/impEquip/list?pageNumber={page}&pageSize={size}'
),
//获取重点设备列表
accidentTypeNoPageListUrl
:
completePrefix
(
baseURI
,
'api/accidentType/all-list'
),
matchEquipmentListUrl
:
completePrefix
(
baseURI
,
'api/impEquip/{equipmentId}/fireeqmt/page?pageNumber={page}&pageSize={size}'
),
//获取重点设备的配套装备列表
matchEquipmentListUrl
:
completePrefix
(
baseURI
,
'api/impEquip/{equipmentId}/fireeqmt/page?pageNumber={page}&pageSize={size}'
),
alarmInfoListUrl
:
completePrefix
(
baseURI
,
'api/alarm/pagelist?pageNumber={page}&pageSize={size}'
),
//报警信息列表查询
areaPlistUrl
:
completePrefix
(
baseURI
,
'api/fireSource/fire-equip/area'
),
//生产区域查询查询
equipNoPageListUrl
:
completePrefix
(
baseURI
,
'api/impEquip/all-list'
),
//保护对象查询
...
...
@@ -266,9 +267,8 @@ export const FasSerUrl = {
regionProvinceUrl
:
completePrefix
(
baseURI
,
'systemctl/v1/region/province'
),
// 字典查询
regionChildren
:
completePrefix
(
baseURI
,
'systemctl/v1/region/children?parentId={value}'
),
// 查询省级行政区划数据
saveStationMainten
:
completePrefix
(
baseURI
,
'api/stationMainten/save'
),
// 保存站端信息
loadStationMainten
:
completePrefix
(
baseURI
,
'api/stationMainten/detail'
)
// 获取站端详情
loadStationMainten
:
completePrefix
(
baseURI
,
'api/stationMainten/detail'
),
// 获取站端详情
getFiltersUrl
:
completePrefix
(
baseURI
,
'api/equipment/list-tree'
)
// 获取装备信息
};
...
...
src/services/ledgerService.js
View file @
5d341be4
...
...
@@ -33,6 +33,25 @@ export const getFireEquipmentListAction = (filter, page, size) => {
return
commonGet
(
url
);
};
/**
* 新-获取消防设备列表
*
* @param {*} filter
* @param {*} page
* @param {*} size
*/
export
const
getFireEquipmentListsAction
=
(
filter
,
equipmentId
,
page
,
size
)
=>
{
let
{
name
,
code
}
=
filter
;
name
=
name
===
undefined
?
null
:
name
;
code
=
code
===
undefined
?
null
:
code
;
equipmentId
=
equipmentId
===
undefined
?
null
:
equipmentId
;
// bindStation = bindStation === undefined ? '' : bindStation;
// equipClassify = equipClassify === undefined ? '0,1,3' : equipClassify;
let
url
=
formatUrl
(
FasSerUrl
.
getFireEquipmentListstUrl
,
{
name
,
code
,
page
,
size
,
equipmentId
});
return
commonGet
(
url
);
};
/**
* 已配置点位列表
*
...
...
@@ -555,3 +574,7 @@ export const configPointEquipment = (pointIds, deviceId) => {
export
const
queryPointFMEAAction
=
(
pointId
)
=>
{
return
commonGet
(
formatUrl
(
FasSerUrl
.
queryPointFMEAUrl
,
{
pointId
}));
};
export
const
getFiltersAction
=
()
=>
{
return
commonGet
(
formatUrl
(
FasSerUrl
.
getFiltersUrl
));
};
src/view/bizview/equipmentLedger/Equipment/EquipmentFireEquipmentAdd.js
View file @
5d341be4
...
...
@@ -2,95 +2,68 @@ import React, { Component } from 'react';
import
PropTypes
from
'prop-types'
;
import
{
Select
,
Input
}
from
'amos-framework'
;
import
AmosGridTable
from
'./../../common/tableComponent/table/AmosGridTable'
;
import
{
getFireEquipmentListAction
}
from
'./../../../../services/ledgerService'
;
import
{
TreeSelect
}
from
'amos-antd'
;
// import { getFireEquipmentListAction } from './../../../../services/ledgerService';
import
{
getFiltersAction
,
getFireEquipmentListsAction
}
from
'./../../../../services/ledgerService'
;
import
EditableCell
from
'./../../common/editableCell/EditableCell'
;
import
{
consts
}
from
'amos-tool'
;
import
'../index.scss'
;
const
Option
=
Select
.
Option
;
const
EquipClassifyEnum
=
{
0
:
'设备类'
,
1
:
'耗材类'
,
2
:
'视频监控'
,
3
:
'灭火器材'
};
const
fireEquipmentTableColumns
=
self
=>
{
return
[
{
title
:
'序号'
,
render
:
(
text
,
record
,
index
)
=>
`
${
index
+
1
}
`
render
:
(
text
,
record
,
index
)
=>
`
${
index
+
1
}
`
,
width
:
'5%'
},
{
title
:
'编号'
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
'1
0
%'
width
:
'1
5
%'
},
{
title
:
'名称'
,
dataIndex
:
'name'
,
key
:
'name'
,
width
:
'1
4
%'
width
:
'1
5
%'
},
{
title
:
'分类'
,
dataIndex
:
'equip_classify'
,
key
:
'equip_classify'
,
width
:
'9%'
,
render
:
(
text
)
=>
EquipClassifyEnum
[
text
]
dataIndex
:
'type'
,
key
:
'type'
,
width
:
'15%'
},
{
title
:
'状态'
,
dataIndex
:
'is
B
ind'
,
key
:
'is
B
ind'
,
dataIndex
:
'is
b
ind'
,
key
:
'is
b
ind'
,
width
:
'10%'
,
render
:
text
=>
text
===
'YES'
?
'已绑定设备'
:
''
},
{
title
:
'建/构筑物'
,
dataIndex
:
'production_area'
,
key
:
'production_area'
,
width
:
'14%'
},
{
title
:
'楼层'
,
dataIndex
:
'floor3d'
,
key
:
'floor3d'
,
width
:
'5%'
},
{
title
:
'房间'
,
dataIndex
:
'room'
,
key
:
'room'
,
width
:
'9%'
title
:
'位置'
,
dataIndex
:
'address'
,
key
:
'address'
,
width
:
'20%'
},
// {
// title: '类型',
// dataIndex: 'equip_type',
// key: 'equip_type',
// width: '9%'
// },
// {
// title: '规格型号',
// dataIndex: 'model',
// key: 'model',
// width: '8%'
// },
// {
// title: '厂商',
// dataIndex: 'manufacturer',
// key: 'manufacturer',
// width: '14%'
// },
{
title
:
'数量'
,
dataIndex
:
'
number
'
,
key
:
'
number
'
,
width
:
'
5
%'
dataIndex
:
'
amount
'
,
key
:
'
amount
'
,
width
:
'
10
%'
},
{
title
:
'添加数量'
,
dataIndex
:
'
numberInStation
'
,
key
:
'
numberInStation
'
,
width
:
'
9
%'
,
render
:
(
text
,
record
)
=>
record
.
equip_classify
===
1
?
(
<
EditableCell
value
=
{
text
}
num
=
{
record
.
number
}
onChange
=
{(
text
)
=>
self
.
onCellChange
(
record
,
text
)}
/
>
)
:
''
dataIndex
:
'
single
'
,
key
:
'
single
'
,
width
:
'
10
%'
,
render
:
(
text
,
record
,
index
)
=>
record
.
single
===
0
?
''
:
(
<
EditableCell
value
=
{
text
}
num
=
{
record
.
amount
}
onChange
=
{(
text
)
=>
self
.
onCellChange
(
record
,
text
,
index
)}
/
>
)
}
];
};
...
...
@@ -123,20 +96,23 @@ class EquipmentFireEquipmentAdd extends Component {
enableConfig
:
false
,
//是否打开配置监测点页面
numberInStation
:
1
,
//添加设备数量
unitInStation
:
''
,
//添加设备单位
fireEquipmentId
:
0
//设备ID
fireEquipmentId
:
0
,
//设备ID
filterData
:
[]
//装备9大类
};
}
componentDidMount
()
{
this
.
getFilter
();
}
onBtnClick
()
{
let
{
searchParam
}
=
this
.
state
;
this
.
getFireEquipmentListData
(
searchParam
);
}
onSelectChange
(
index
,
value
)
{
let
{
searchParam
}
=
this
.
state
;
searchParam
.
equipClassify
=
value
.
value
===
-
1
?
'0,1,2,3'
:
value
.
value
;
onSelectChange
(
value
)
{
const
{
searchParam
}
=
this
.
state
;
searchParam
.
code
=
value
;
searchParam
.
pageNumber
=
this
.
pageConfig
.
pageNumber
;
searchParam
.
pageSize
=
this
.
pageConfig
.
pageSize
;
this
.
setState
({
...
...
@@ -155,14 +131,18 @@ class EquipmentFireEquipmentAdd extends Component {
},
()
=>
this
.
getFireEquipmentListData
(
searchParam
));
};
onCellChange
=
(
record
,
text
)
=>
{
onCellChange
=
(
record
,
text
,
index
)
=>
{
// if ( text !== ''){
// const { dataList } = this.state;
// dataList[index].amount = text;
// this.setState({ dataList });
// }
let
{
selectedRowKeys
,
selectedRows
}
=
this
.
state
;
let
rowKey
=
record
.
id
;
let
row
=
record
;
selectedRowKeys
.
push
(
rowKey
);
selectedRowKeys
=
Array
.
from
(
new
Set
([...
selectedRowKeys
]));
selectedRows
.
push
(
row
);
this
.
setState
({
numberInStation
:
parseInt
(
text
),
unitInStation
:
record
.
unit
,
...
...
@@ -171,14 +151,27 @@ class EquipmentFireEquipmentAdd extends Component {
});
};
getFilter
=
()
=>
{
getFiltersAction
().
then
(
filterData
=>
{
filterData
=
this
.
formatterCategory
(
filterData
);
this
.
setState
({
filterData
});
});
}
getFireEquipmentListData
=
param
=>
{
le
t
{
searchParam
}
=
this
.
state
;
cons
t
{
searchParam
}
=
this
.
state
;
if
(
param
.
current
!=
null
)
{
//前端的current 即后端的pageNumber
param
.
pageNumber
=
param
.
current
;
}
Object
.
assign
(
searchParam
,
{
...
param
});
getFireEquipmentListAction
(
searchParam
,
param
.
pageNumber
,
param
.
pageSize
).
then
(
data
=>
{
// getFireEquipmentListAction(searchParam, param.pageNumber, param.pageSize).then(data => {
// this.setState({
// dataList: data.content,
// totalCount: data.totalElements
// });
// });
getFireEquipmentListsAction
(
searchParam
,
null
,
param
.
pageNumber
,
param
.
pageSize
).
then
(
data
=>
{
this
.
setState
({
dataList
:
data
.
content
,
totalCount
:
data
.
totalElements
...
...
@@ -212,6 +205,18 @@ class EquipmentFireEquipmentAdd extends Component {
this
.
setState
({
selectedRows
,
selectedRowKeys
});
};
formatterCategory
=
(
arr
)
=>
{
let
data
=
[];
if
(
arr
.
length
>
0
)
{
arr
.
forEach
((
item
,
i
)
=>
{
data
.
push
({
label
:
item
.
name
,
value
:
item
.
code
,
children
:
[]
});
if
(
item
.
children
.
length
>
0
)
{
data
[
i
].
children
=
this
.
formatterCategory
(
item
.
children
);
}
});
}
return
data
;
}
/**
* 获取表格刷新方法
*/
...
...
@@ -228,23 +233,27 @@ class EquipmentFireEquipmentAdd extends Component {
};
render
()
{
let
{
name
,
selectedRowKeys
,
dataList
,
totalCount
}
=
this
.
state
;
le
t
_true_
=
true
;
const
{
name
,
selectedRowKeys
,
dataList
,
totalCount
,
filterData
}
=
this
.
state
;
cons
t
_true_
=
true
;
return
(
<
div
className
=
"equipment-fire-equipment"
style
=
{{
background
:
'#33333'
,
height
:
'100%'
}}
>
<
div
className
=
"equipment-fire-equipment-search"
>
<
div
>
<
span
>
分类:
<
/span
>
<
Select
onChange
=
{(
e
,
value
)
=>
this
.
onSelectChange
(
e
,
value
)}
defaultValue
=
{
-
1
}
>
<
Option
value
=
{
-
1
}
>
全部
<
/Option
>
<
Option
value
=
{
0
}
>
设备类
<
/Option
>
<
Option
value
=
{
1
}
>
耗材类
<
/Option
>
<
Option
value
=
{
2
}
>
视频监控
<
/Option
>
<
Option
value
=
{
3
}
>
灭火器材
<
/Option
>
<
/Select
>
<
TreeSelect
dropdownStyle
=
{{
maxHeight
:
400
,
overflow
:
'auto'
,
width
:
250
}}
treeData
=
{
filterData
}
placeholder
=
"请选择"
treeDefaultExpandAll
allowClear
showSearch
treeNodeFilterProp
=
"title"
filterTreeNode
=
{(
inputValue
,
treeNode
)
=>
treeNode
.
props
.
title
.
toLocaleLowerCase
().
includes
(
inputValue
.
toLocaleLowerCase
())}
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
...
...
src/view/bizview/equipmentLedger/Equipment/MatchEquipment.js
View file @
5d341be4
...
...
@@ -9,7 +9,8 @@ import {
deleteMatchEquipmentAction
,
bindMatchEquipmentAction
,
getPrePlanPictureAction
,
getEquipmentDataAction
getEquipmentDataAction
,
getFireEquipmentListsAction
}
from
'./../../../../services/ledgerService'
;
import
EquipmentFireEquipmentAdd
from
'./EquipmentFireEquipmentAdd'
;
import
Picture
from
'./Picture'
;
...
...
@@ -28,31 +29,19 @@ const matchEquipmentTableColumns = self => {
title
:
'编号'
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
'
15
%'
width
:
'
30
%'
},
{
title
:
'名称'
,
dataIndex
:
'name'
,
key
:
'name'
,
width
:
'
22
%'
width
:
'
30
%'
},
{
title
:
'建/构筑物'
,
dataIndex
:
'productionArea'
,
key
:
'productionArea'
,
width
:
'20%'
},
{
title
:
'楼层'
,
dataIndex
:
'floor3d'
,
key
:
'floor3d'
,
width
:
'10%'
},
{
title
:
'房间'
,
dataIndex
:
'room'
,
key
:
'room'
,
width
:
'20%'
title
:
'位置'
,
dataIndex
:
'address'
,
key
:
'address'
,
width
:
'40%'
}
];
};
...
...
@@ -188,7 +177,14 @@ class MatchEquipment extends Component {
param
.
pageNumber
=
param
.
current
;
}
Object
.
assign
(
searchParam
,
{
...
param
});
equipmentId
&&
getMatchEquipmentListAction
(
searchParam
,
equipmentId
,
searchParam
.
pageNumber
,
searchParam
.
pageSize
).
then
(
data
=>
{
// equipmentId && getMatchEquipmentListAction(searchParam, equipmentId, searchParam.pageNumber, searchParam.pageSize).then(data => {
// this.setState({
// dataList: data.content,
// totalCount: data.totalElements
// });
// });
equipmentId
&&
getFireEquipmentListsAction
(
searchParam
,
equipmentId
,
param
.
pageNumber
,
param
.
pageSize
).
then
(
data
=>
{
this
.
setState
({
dataList
:
data
.
content
,
totalCount
:
data
.
totalElements
...
...
src/view/bizview/equipmentLedger/index.scss
0 → 100644
View file @
5d341be4
.equipment-fire-equipment
{
.equipment-fire-equipment-search
{
.ant-select-selection--single
{
width
:
250px
;
margin
:
0
10px
0
0
;
}
}
}
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