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
8914db12
Commit
8914db12
authored
Mar 01, 2020
by
taabe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化关联设备指标添加编辑页面
parent
e6d5414e
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
132 additions
and
76 deletions
+132
-76
urlConsts.js
src/consts/urlConsts.js
+1
-1
preControlService.js
src/services/preControlService.js
+2
-2
MatchEquipment.js
src/view/bizview/equipmentLedger/Equipment/MatchEquipment.js
+3
-3
index.js
src/view/bizview/equipmentLedger/Equipment/index.js
+2
-2
index.js
...view/equipmentLedger/FireResources/FireEquipment/index.js
+4
-4
fireStation.js
.../equipmentLedger/FireResources/FireStation/fireStation.js
+5
-5
index.js
.../bizview/equipmentLedger/FireResources/FireTruck/index.js
+5
-5
index.js
...zview/equipmentLedger/FireResources/fireDetector/index.js
+1
-1
fireFoam.js
...izview/equipmentLedger/FireResources/fireFoam/fireFoam.js
+4
-4
water.js
...view/bizview/equipmentLedger/FireResources/water/water.js
+3
-3
AssociatedEquipTable.js
...view/bizview/preControl/riskModel/AssociatedEquipTable.js
+42
-9
AssociatedPointTable.js
...view/bizview/preControl/riskModel/AssociatedPointTable.js
+18
-21
index.js
src/view/bizview/preControl/riskModel/index.js
+8
-6
EquipModel.js
src/view/bizview/preControl/riskModel/model/EquipModel.js
+30
-7
FireEquipIndexTable.js
...bizview/preControl/riskModel/model/FireEquipIndexTable.js
+4
-3
No files found.
src/consts/urlConsts.js
View file @
8914db12
...
...
@@ -148,7 +148,7 @@ export const FasSerUrl = {
bindPointUrl
:
completePrefix
(
baseURI
,
'api/risksource/bindFmea/pointInputitem'
),
//巡检点关联
riskSourceRpnCountUrl
:
completePrefix
(
baseURI
,
'api/risksource/rpn/list'
),
// 查询风险点RPN统计
bindEquipListUrl
:
completePrefix
(
baseURI
,
'api/risksource/fireequiment/relation/all?equimentId={equimentId}&fname={fname}&pageNumber={page}&pageSize={size}'
),
//配套设施查询(已绑定及未绑定)
getBindEquipIndexUrl
:
completePrefix
(
baseURI
,
'api/risksource/listEquipmentPointById?fmeaId={fmeaId}&equimentId={equimentId}&equipmentPointName={equipmentPointName}'
),
//获取配套设备指标项
getBindEquipIndexUrl
:
completePrefix
(
baseURI
,
'api/risksource/listEquipmentPointById?fmeaId={fmeaId}&
importantEquipId={importantEquipId}&
equimentId={equimentId}&equipmentPointName={equipmentPointName}'
),
//获取配套设备指标项
bindEquipIndexUrl
:
completePrefix
(
baseURI
,
'api/risksource/bingFmea/equimentPoint'
),
deleteBindEquipUrl
:
completePrefix
(
baseURI
,
'api/risksource/fireequiment/relation/{ids}'
),
removeByRSIdAndPIdUrl
:
completePrefix
(
baseURI
,
'api/risksource/removeByRSIdAndPId'
),
//删除绑定的设备
...
...
src/services/preControlService.js
View file @
8914db12
...
...
@@ -111,8 +111,8 @@ export const bindEquipListAction = (riskSourceId , equimentId, page, size,fname)
return
commonGet
(
formatUrl
(
FasSerUrl
.
bindEquipListUrl
,
{
riskSourceId
,
equimentId
,
fname
,
page
,
size
}));
};
export
const
getBindEquipIndexAction
=
(
fmeaId
,
equimentId
,
equipmentPointName
)
=>
{
let
url
=
formatUrl
(
FasSerUrl
.
getBindEquipIndexUrl
,
{
fmeaId
,
equimentId
,
equipmentPointName
});
export
const
getBindEquipIndexAction
=
(
fmeaId
,
importantEquipId
,
equimentId
,
equipmentPointName
)
=>
{
let
url
=
formatUrl
(
FasSerUrl
.
getBindEquipIndexUrl
,
{
fmeaId
,
importantEquipId
,
equimentId
,
equipmentPointName
});
return
commonGet
(
url
);
};
...
...
src/view/bizview/equipmentLedger/Equipment/MatchEquipment.js
View file @
8914db12
...
...
@@ -28,13 +28,13 @@ const matchEquipmentTableColumns = self => {
title
:
'编号'
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
'
20
%'
width
:
'
15
%'
},
{
title
:
'名称'
,
dataIndex
:
'name'
,
key
:
'name'
,
width
:
'2
5
%'
width
:
'2
2
%'
},
{
title
:
'建/构筑物'
,
...
...
@@ -46,7 +46,7 @@ const matchEquipmentTableColumns = self => {
title
:
'楼层'
,
dataIndex
:
'floor3d'
,
key
:
'floor3d'
,
width
:
'
5
%'
width
:
'
10
%'
},
{
title
:
'房间'
,
...
...
src/view/bizview/equipmentLedger/Equipment/index.js
View file @
8914db12
...
...
@@ -26,7 +26,7 @@ const equipmentTableColumns = self => {
title
:
'编号'
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
'1
5
%'
width
:
'1
0
%'
},
{
title
:
'名称'
,
...
...
@@ -44,7 +44,7 @@ const equipmentTableColumns = self => {
title
:
'位置'
,
dataIndex
:
'address'
,
key
:
'address'
,
width
:
'
15
%'
width
:
'
23
%'
},
{
title
:
'配套设备'
,
...
...
src/view/bizview/equipmentLedger/FireResources/FireEquipment/index.js
View file @
8914db12
...
...
@@ -32,7 +32,7 @@ const fireEquipmentTableColumns = self => {
title
:
'装备名称'
,
dataIndex
:
'name'
,
key
:
'name'
,
width
:
'
9
%'
width
:
'
8
%'
},
{
title
:
'分类'
,
...
...
@@ -69,7 +69,7 @@ const fireEquipmentTableColumns = self => {
title
:
'建/构筑物'
,
dataIndex
:
'riskSourceName'
,
key
:
'riskSourceName'
,
width
:
'
6
%'
width
:
'
8
%'
},
{
title
:
'楼层'
,
...
...
@@ -81,7 +81,7 @@ const fireEquipmentTableColumns = self => {
title
:
'房间'
,
dataIndex
:
'room'
,
key
:
'room'
,
width
:
'
4
%'
width
:
'
6
%'
},
{
title
:
'保养周期(月)'
,
...
...
@@ -99,7 +99,7 @@ const fireEquipmentTableColumns = self => {
title
:
'品牌'
,
dataIndex
:
'brand'
,
key
:
'brand'
,
width
:
'
5
%'
width
:
'
8
%'
},
{
title
:
'生产日期'
,
...
...
src/view/bizview/equipmentLedger/FireResources/FireStation/fireStation.js
View file @
8914db12
...
...
@@ -30,31 +30,31 @@ const fireStationTableColumns = self => {
title
:
'编号'
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
'1
5
%'
width
:
'1
0
%'
},
{
title
:
'名称'
,
dataIndex
:
'name'
,
key
:
'name'
,
width
:
'2
0
%'
width
:
'2
5
%'
},
{
title
:
'所属区域'
,
dataIndex
:
'riskSourceName'
,
key
:
'riskSourceName'
,
width
:
'2
0
%'
width
:
'2
5
%'
},
{
title
:
'位置'
,
dataIndex
:
'address'
,
key
:
'address'
,
width
:
'
30
%'
width
:
'
24
%'
},
{
title
:
'配套设备'
,
dataIndex
:
''
,
key
:
''
,
width
:
'
2
0%'
,
width
:
'
1
0%'
,
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
span
>
...
...
src/view/bizview/equipmentLedger/FireResources/FireTruck/index.js
View file @
8914db12
...
...
@@ -25,7 +25,7 @@ const fireTruckTableColumns = self => {
title
:
'车辆类型'
,
dataIndex
:
'type'
,
key
:
'type'
,
width
:
'1
5
%'
width
:
'1
0
%'
},
{
title
:
'车辆名称'
,
...
...
@@ -43,25 +43,25 @@ const fireTruckTableColumns = self => {
title
:
'发动机号'
,
dataIndex
:
'engineNum'
,
key
:
'engineNum'
,
width
:
'1
0
%'
width
:
'1
2
%'
},
{
title
:
'厂牌型号'
,
dataIndex
:
'model'
,
key
:
'model'
,
width
:
'1
0
%'
width
:
'1
3
%'
},
{
title
:
'国别'
,
dataIndex
:
'country'
,
key
:
'country'
,
width
:
'
10
%'
width
:
'
7
%'
},
{
title
:
'所在区域'
,
dataIndex
:
'riskSourceName'
,
key
:
'riskSourceName'
,
width
:
'1
0
%'
width
:
'1
5
%'
},
// {
// title: '车辆状态',
...
...
src/view/bizview/equipmentLedger/FireResources/fireDetector/index.js
View file @
8914db12
...
...
@@ -35,7 +35,7 @@ const fireDetectorTableColumns = self => {
title
:
'重量'
,
dataIndex
:
'weight'
,
key
:
'weight'
,
width
:
'
5
%'
width
:
'
4
%'
},
{
title
:
'设备状态'
,
...
...
src/view/bizview/equipmentLedger/FireResources/fireFoam/fireFoam.js
View file @
8914db12
...
...
@@ -30,7 +30,7 @@ const fireFoamTableColumns = self => {
title
:
'编号'
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
'1
7
%'
width
:
'1
0
%'
},
{
title
:
'名称'
,
...
...
@@ -42,19 +42,19 @@ const fireFoamTableColumns = self => {
title
:
'所属区域'
,
dataIndex
:
'riskSourceName'
,
key
:
'riskSourceName'
,
width
:
'2
0
%'
width
:
'2
5
%'
},
{
title
:
'位置'
,
dataIndex
:
'address'
,
key
:
'address'
,
width
:
'
30
%'
width
:
'
24
%'
},
{
title
:
'配套设备'
,
dataIndex
:
''
,
key
:
''
,
width
:
'
2
0%'
,
width
:
'
1
0%'
,
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
span
>
...
...
src/view/bizview/equipmentLedger/FireResources/water/water.js
View file @
8914db12
...
...
@@ -23,7 +23,7 @@ const fireWaterTableColumns = self => {
title
:
'编号'
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
'1
0
%'
width
:
'1
1
%'
},
{
title
:
'名称'
,
...
...
@@ -41,7 +41,7 @@ const fireWaterTableColumns = self => {
title
:
'楼层'
,
dataIndex
:
'floor3d'
,
key
:
'floor3d'
,
width
:
'
10
%'
width
:
'
5
%'
},
{
title
:
'房间'
,
...
...
@@ -59,7 +59,7 @@ const fireWaterTableColumns = self => {
title
:
'配套设备'
,
dataIndex
:
''
,
key
:
''
,
width
:
'
10
%'
,
width
:
'
8
%'
,
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
span
>
...
...
src/view/bizview/preControl/riskModel/AssociatedEquipTable.js
View file @
8914db12
...
...
@@ -21,8 +21,8 @@ const getColumns = () => {
},
{
title
:
'所属重点设备'
,
dataIndex
:
'importantEquip'
,
key
:
'importantEquip'
,
dataIndex
:
'importantEquip
Name
'
,
key
:
'importantEquip
Name
'
,
width
:
'25%'
,
className
:
'uant-table-thead'
},
...
...
@@ -31,7 +31,38 @@ const getColumns = () => {
dataIndex
:
'equipmentPointNames'
,
key
:
'equipmentPointNames'
,
width
:
'35%'
,
className
:
'uant-table-thead'
className
:
'uant-table-thead'
,
render
:
(
text
,
record
)
=>
{
//根据换行符分隔
let
arr
=
text
.
split
(
'
\
n'
);
let
p
=
document
.
createElement
(
'span'
);
if
(
arr
&&
arr
!=
null
){
arr
.
map
(
e
=>
{
if
(
e
.
endsWith
(
'##0'
)){
let
grandChildItem
=
document
.
createElement
(
'p'
);
let
a
=
e
.
replace
(
'##0'
,
''
);
grandChildItem
.
innerText
=
a
;
let
font
=
document
.
createElement
(
'font'
);
font
.
innerText
=
' 正常'
;
font
.
style
.
color
=
'green'
;
grandChildItem
.
append
(
font
);
p
.
append
(
grandChildItem
);
}
else
{
let
grandChildItem
=
document
.
createElement
(
'p'
);
let
b
=
e
.
replace
(
'##1'
,
''
);
grandChildItem
.
innerText
=
b
;
let
font
=
document
.
createElement
(
'font'
);
font
.
innerText
=
' 报警'
;
font
.
style
.
color
=
'red'
;
grandChildItem
.
append
(
font
);
p
.
append
(
grandChildItem
);
}
});
return
<
div
dangerouslySetInnerHTML
=
{{
__html
:
p
.
outerHTML
}}
/>
;
}
}
}
];
};
...
...
@@ -58,17 +89,18 @@ class AssociatedEquipTable extends Component {
onRowClick
=
record
=>
{
let
{
selectedRowKeys
,
selectedRows
}
=
this
.
state
;
let
exist
=
false
;
let
id
=
record
.
importantEquipId
+
'-'
+
record
.
equipmentId
;
selectedRows
.
find
(
item
=>
{
if
(
item
.
equipmentId
===
record
.
equipmentI
d
)
{
if
(
item
.
id
===
i
d
)
{
exist
=
true
;
}
});
if
(
exist
)
{
selectedRows
.
splice
(
selectedRows
.
findIndex
(
item
=>
item
.
equipmentId
===
record
.
equipmentI
d
),
1
);
selectedRowKeys
.
splice
(
selectedRowKeys
.
findIndex
(
item
=>
item
===
record
.
equipmentI
d
),
1
);
selectedRows
.
splice
(
selectedRows
.
findIndex
(
item
=>
item
.
id
===
i
d
),
1
);
selectedRowKeys
.
splice
(
selectedRowKeys
.
findIndex
(
item
=>
item
===
i
d
),
1
);
}
else
{
selectedRows
.
push
(
record
);
selectedRowKeys
.
push
(
record
.
equipmentI
d
);
selectedRowKeys
.
push
(
i
d
);
}
this
.
setState
({
selectedRows
,
...
...
@@ -97,7 +129,8 @@ class AssociatedEquipTable extends Component {
getRowClassName
=
(
record
,
index
)
=>
{
let
{
selectedRowKeys
}
=
this
.
state
;
if
(
selectedRowKeys
.
findIndex
(
item
=>
item
===
record
.
equipmentId
)
>=
0
)
{
let
id
=
record
.
importantEquipId
+
'-'
+
record
.
equipmentId
;
if
(
selectedRowKeys
.
findIndex
(
item
=>
item
===
id
)
>=
0
)
{
return
'highlight-row'
;
}
else
{
return
'normal-row'
;
...
...
@@ -132,7 +165,7 @@ class AssociatedEquipTable extends Component {
render
()
{
let
{
pagination
,
isChecked
,
selectedRowKeys
}
=
this
.
state
;
let
{
dataList
,
fetchData
,
totalCount
}
=
this
.
props
;
dataList
.
map
(
data
=>
data
.
id
=
data
.
equipmentId
);
dataList
.
map
(
data
=>
data
.
id
=
data
.
importantEquipId
+
'-'
+
data
.
equipmentId
);
let
defaultPageConfig
=
this
.
pageConfig
;
return
(
<
div
className
=
"risk-model-table"
>
...
...
src/view/bizview/preControl/riskModel/AssociatedPointTable.js
View file @
8914db12
...
...
@@ -46,37 +46,34 @@ const getColumns = () => {
width
:
'40%'
,
className
:
'uant-table-thead'
,
render
:
(
text
,
record
)
=>
{
//根据换行符分隔
let
arr
=
text
.
split
(
"
\
n"
);
let
p
=
document
.
createElement
(
'span'
)
if
(
arr
&&
arr
!=
null
){
let
arr
=
text
.
split
(
'
\
n'
);
let
p
=
document
.
createElement
(
'span'
)
;
if
(
arr
&&
arr
!=
null
){
arr
.
map
(
e
=>
{
if
(
e
.
endsWith
(
"##0"
)){
if
(
e
.
endsWith
(
'##0'
)){
let
grandChildItem
=
document
.
createElement
(
'p'
);
let
a
=
e
.
replace
(
"##0"
,
""
);
grandChildItem
.
innerText
=
a
;
let
a
=
e
.
replace
(
'##0'
,
''
);
grandChildItem
.
innerText
=
a
;
let
font
=
document
.
createElement
(
'font'
);
font
.
innerText
=
" 合格"
;
font
.
style
.
color
=
"green"
;
font
.
innerText
=
' 合格'
;
font
.
style
.
color
=
'green'
;
grandChildItem
.
append
(
font
);
p
.
append
(
grandChildItem
)
}
else
{
p
.
append
(
grandChildItem
);
}
else
{
let
grandChildItem
=
document
.
createElement
(
'p'
);
let
b
=
e
.
replace
(
"##1"
,
""
);
grandChildItem
.
innerText
=
b
;
let
b
=
e
.
replace
(
'##1'
,
''
);
grandChildItem
.
innerText
=
b
;
let
font
=
document
.
createElement
(
'font'
);
font
.
innerText
=
" 不合格"
;
font
.
style
.
color
=
"red"
;
font
.
innerText
=
' 不合格'
;
font
.
style
.
color
=
'red'
;
grandChildItem
.
append
(
font
);
p
.
append
(
grandChildItem
)
p
.
append
(
grandChildItem
)
;
}
})
return
<
div
dangerouslySetInnerHTML
=
{{
__html
:
p
.
outerHTML
}}
><
/div
>
});
return
<
div
dangerouslySetInnerHTML
=
{{
__html
:
p
.
outerHTML
}}
/>
;
}
}
}
...
...
src/view/bizview/preControl/riskModel/index.js
View file @
8914db12
...
...
@@ -400,11 +400,11 @@ class RiskModel extends Component {
fmeaId
&&
this
.
bindPoints
(
fmeaId
,
pointId
,
selectData
);
}
bindEquipIndexCallback
=
(
equipmentId
)
=>
{
bindEquipIndexCallback
=
(
importantEquipId
,
equipmentId
)
=>
{
const
{
fmeaId
}
=
this
.
state
;
let
{
selectData
}
=
this
.
model
.
state
;
selectData
=
selectData
.
filter
(
data
=>
data
.
equipmentId
===
equipmentId
);
fmeaId
&&
this
.
bindEquipIndexs
(
fmeaId
,
equipmentId
,
selectData
);
fmeaId
&&
this
.
bindEquipIndexs
(
fmeaId
,
importantEquipId
,
equipmentId
,
selectData
);
}
riskSourceEdit
=
(
body
)
=>
{
...
...
@@ -440,14 +440,15 @@ class RiskModel extends Component {
);
};
bindEquipIndexs
=
(
fmeaId
,
equipmentId
,
equipIndexs
)
=>
{
bindEquipIndexs
=
(
fmeaId
,
importEquipId
,
equipmentId
,
equipIndexs
)
=>
{
let
equipmentPointIds
=
[];
let
param
=
{};
equipIndexs
.
map
(
item
=>
{
equipmentPointIds
.
push
(
item
.
equipIndexId
);
});
param
.
equipmentId
=
equipmentId
;
param
.
fmeaId
=
fmeaId
;
param
.
importantEquipmentId
=
importEquipId
;
param
.
equipmentId
=
equipmentId
;
param
.
equipmentPointIds
=
equipmentPointIds
;
bindEquipIndexAction
(
param
).
then
(
data
=>
{
...
...
@@ -618,11 +619,12 @@ class RiskModel extends Component {
}
}
else
if
(
modelFlag
===
'equip'
){
if
(
toolBarFlag
){
let
{
equipData
}
=
this
.
state
;
if
(
toolBarFlag
===
'1'
){
//新增
return
<
EquipModel
bindEquipIndexCallback
=
{
this
.
bindEquipIndexCallback
}
fmeaId
=
{
fmeaId
}
riskSourceId
=
{
riskSourceId
}
ref
=
{
component
=>
this
.
model
=
component
}
/>
;
return
<
EquipModel
bind
ingEquips
=
{
equipData
}
bind
EquipIndexCallback
=
{
this
.
bindEquipIndexCallback
}
fmeaId
=
{
fmeaId
}
riskSourceId
=
{
riskSourceId
}
ref
=
{
component
=>
this
.
model
=
component
}
/>
;
}
else
if
(
this
.
equipRef
)
{
const
{
selectedRows
}
=
this
.
equipRef
.
state
;
return
<
EquipModel
{...
selectedRows
[
0
]}
bindEquipIndexCallback
=
{
this
.
bindEquipIndexCallback
}
fmeaId
=
{
fmeaId
}
riskSourceId
=
{
riskSourceId
}
ref
=
{
component
=>
this
.
model
=
component
}
/>
;
return
<
EquipModel
bindingEquips
=
{
equipData
}
{...
selectedRows
[
0
]}
bindEquipIndexCallback
=
{
this
.
bindEquipIndexCallback
}
fmeaId
=
{
fmeaId
}
riskSourceId
=
{
riskSourceId
}
ref
=
{
component
=>
this
.
model
=
component
}
/>
;
}
}
}
...
...
src/view/bizview/preControl/riskModel/model/EquipModel.js
View file @
8914db12
...
...
@@ -28,8 +28,8 @@ class EquipModel extends Component {
}
componentWillMount
=
()
=>
{
let
{
e
Id
}
=
{
...
this
.
props
};
eId
&&
this
.
setState
({
e
Id
});
let
{
importantEquip
Id
}
=
{
...
this
.
props
};
importantEquipId
&&
this
.
setState
({
importantEquip
Id
});
};
setParamAndSearch
=
(
param
)
=>
{
...
...
@@ -60,10 +60,30 @@ class EquipModel extends Component {
}
queryBindEquip
=
(
riskSourceId
,
equipmentId
,
fname
)
=>
{
let
{
bindingEquips
,
importantEquipId
}
=
this
.
props
;
let
bindingEquipIds
=
[];
bindingEquips
.
map
(
b
=>
{
if
(
b
.
importantEquipId
===
equipmentId
)
{
bindingEquipIds
.
push
(
b
.
equipmentId
);
}
});
this
.
setState
({
importEquipId
:
equipmentId
});
equipmentId
&&
bindEquipListAction
(
riskSourceId
,
equipmentId
,
0
,
-
1
,
fname
).
then
(
data
=>
{
//查询巡检点项
let
{
selectData
}
=
this
.
state
;
let
content
=
data
.
content
;
//内容
//过滤已经添加的配套设备
content
=
content
.
filter
(
equip
=>
{
console
.
log
(
equip
);
if
(
importantEquipId
)
{
if
(
bindingEquipIds
.
includes
(
equip
.
id
))
{
return
true
;
}
}
else
{
if
(
!
bindingEquipIds
.
includes
(
equip
.
id
))
{
return
true
;
}
}
});
if
(
!
fname
){
let
fireEquip
=
content
.
filter
(
item
=>
item
.
isBound
===
'bound'
);
//已经选择的行数据
let
selects
=
fireEquip
.
map
(
e
=>
{
//已经选择的id集合
...
...
@@ -86,7 +106,8 @@ class EquipModel extends Component {
}
queryBindEquipIndex
=
(
fmeaId
,
equipmentId
,
equipmentPointName
)
=>
{
fmeaId
&&
equipmentId
&&
getBindEquipIndexAction
(
fmeaId
,
equipmentId
,
equipmentPointName
).
then
(
data
=>
{
let
{
importEquipId
}
=
this
.
state
;
fmeaId
&&
equipmentId
&&
getBindEquipIndexAction
(
fmeaId
,
importEquipId
,
equipmentId
,
equipmentPointName
).
then
(
data
=>
{
console
.
log
(
data
);
let
{
selectData
}
=
this
.
state
;
if
(
!
equipmentPointName
){
...
...
@@ -120,12 +141,12 @@ class EquipModel extends Component {
render
()
{
let
{
riskSourceId
,
bindEquipIndexCallback
,
fmeaId
}
=
this
.
props
;
let
{
dataList
,
importEquipId
,
equipmentId
,
selects
,
e
Id
,
indexDataList
}
=
this
.
state
;
let
{
dataList
,
importEquipId
,
equipmentId
,
selects
,
importantEquip
Id
,
indexDataList
}
=
this
.
state
;
return
(
<
div
className
=
"equip-model"
>
<
EquipTable
riskSourceId
=
{
riskSourceId
}
importEquipId
=
{
e
Id
}
fetchData
=
{
this
.
queryBindEquip
}
clearCallback
=
{
this
.
clearCallback
}
/
>
<
EquipTable
riskSourceId
=
{
riskSourceId
}
importEquipId
=
{
importantEquip
Id
}
fetchData
=
{
this
.
queryBindEquip
}
clearCallback
=
{
this
.
clearCallback
}
/
>
<
FireEquipTable
fmeaId
=
{
fmeaId
}
importEquipId
=
{
importEquipId
}
selects
=
{
selects
}
dataList
=
{
dataList
}
setParamAndSearch
=
{
this
.
setParamAndSearch
}
fetchData
=
{
this
.
queryBindEquipIndex
}
clearCallback
=
{
this
.
clearCallback
}
/
>
<
FireEquipIndexTable
bindEquipIndexCallback
=
{
bindEquipIndexCallback
}
fmeaId
=
{
fmeaId
}
equipmentId
=
{
equipmentId
}
selects
=
{
selects
}
dataList
=
{
indexDataList
}
callBack
=
{
this
.
setSelectData
}
setParamAndSearch
=
{
this
.
setParamAndSearch
}
/
>
<
FireEquipIndexTable
bindEquipIndexCallback
=
{
bindEquipIndexCallback
}
fmeaId
=
{
fmeaId
}
importantEquipId
=
{
importEquipId
}
equipmentId
=
{
equipmentId
}
selects
=
{
selects
}
dataList
=
{
indexDataList
}
callBack
=
{
this
.
setSelectData
}
setParamAndSearch
=
{
this
.
setParamAndSearch
}
/
>
<
/div
>
);
}
...
...
@@ -134,6 +155,8 @@ class EquipModel extends Component {
EquipModel
.
propTypes
=
{
bindEquipIndexCallback
:
PropTypes
.
func
,
riskSourceId
:
PropTypes
.
any
,
fmeaId
:
PropTypes
.
number
fmeaId
:
PropTypes
.
number
,
bindingEquips
:
PropTypes
.
array
,
importantEquipId
:
PropTypes
.
number
};
export
default
EquipModel
;
src/view/bizview/preControl/riskModel/model/FireEquipIndexTable.js
View file @
8914db12
...
...
@@ -124,8 +124,8 @@ class FireEquipIndexTable extends Component {
}
save
=
()
=>
{
const
{
equipmentId
}
=
this
.
props
;
this
.
props
.
bindEquipIndexCallback
(
equipmentId
);
const
{
importantEquipId
,
equipmentId
}
=
this
.
props
;
this
.
props
.
bindEquipIndexCallback
(
importantEquipId
,
equipmentId
);
}
render
()
{
...
...
@@ -165,6 +165,7 @@ FireEquipIndexTable.propTypes = {
setParamAndSearch
:
PropTypes
.
func
,
callBack
:
PropTypes
.
func
,
dataList
:
PropTypes
.
array
,
selects
:
PropTypes
.
array
selects
:
PropTypes
.
array
,
importantEquipId
:
PropTypes
.
number
};
export
default
FireEquipIndexTable
;
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