Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
AmosBankView
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
bank
AmosBankView
Commits
ace53b11
Commit
ace53b11
authored
May 15, 2020
by
zhengjiangtao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
风险详情修改
parent
7d9f2a91
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
195 additions
and
33 deletions
+195
-33
urlConsts.js
src/consts/urlConsts.js
+2
-1
3dService.js
src/services/3dService.js
+11
-6
RiskSourceDetailModal.js
...w/bank/3dview/points/dialogModel/RiskSourceDetailModal.js
+182
-26
No files found.
src/consts/urlConsts.js
View file @
ace53b11
...
@@ -138,7 +138,8 @@ export const FscSerUrl = {
...
@@ -138,7 +138,8 @@ export const FscSerUrl = {
impEquInterfaceUrl
:
completePrefix
(
baseURI
,
'bank/equipment/netwoerkInterface?id={id}'
),
//查询网络接口
impEquInterfaceUrl
:
completePrefix
(
baseURI
,
'bank/equipment/netwoerkInterface?id={id}'
),
//查询网络接口
dynamicRingDataUrl
:
completePrefix
(
baseURI
,
'bank/dynamicRingData/{id}'
),
//查询动环接口
dynamicRingDataUrl
:
completePrefix
(
baseURI
,
'bank/dynamicRingData/{id}'
),
//查询动环接口
pointItemPatroltaUrl
:
completePrefix
(
baseURI
,
'bank/equipment/pointItemPatrol?factorId={factorId}'
),
pointItemPatroltaUrl
:
completePrefix
(
baseURI
,
'bank/equipment/pointItemPatrol?factorId={factorId}'
),
pointItemDevicetaUrl
:
completePrefix
(
baseURI
,
'bank/equipment/getPointItemDatas?factorId={factorId}'
),
pointItemDevicetaUrl
:
completePrefix
(
baseURI
,
'bank/equipment/pointItemEquipment?factorId={factorId}'
),
pointItemAllUrl
:
completePrefix
(
baseURI
,
'bank/equipment/getPointItemDatas?factorId={factorId}'
),
getxuncountActionUrl
:
completePrefix
(
baseURI
,
'bank/alarm/mobile/getxuncount'
),
getxuncountActionUrl
:
completePrefix
(
baseURI
,
'bank/alarm/mobile/getxuncount'
),
rightTopChartDataUrl
:
completePrefix
(
baseURI
,
'bank/inspection/rightTopChart?companyId={companyId}'
),
rightTopChartDataUrl
:
completePrefix
(
baseURI
,
'bank/inspection/rightTopChart?companyId={companyId}'
),
...
...
src/services/3dService.js
View file @
ace53b11
...
@@ -301,12 +301,18 @@ export const getporintAction = (pointid ) => {
...
@@ -301,12 +301,18 @@ export const getporintAction = (pointid ) => {
};
};
export
const
queryPatrolPointDatas
=
(
i
d
)
=>
{
export
const
queryPatrolPointDatas
=
(
factorI
d
)
=>
{
// return commonGet(formatUrl(DeviceURI.dynamicRingDataUrl, { id }));
// return commonGet(formatUrl(DeviceURI.dynamicRingDataUrl, { id }));
return
commonGet
(
formatUrl
(
FscSerUrl
.
pointItemPatroltaUrl
,
{
i
d
}));
return
commonGet
(
formatUrl
(
FscSerUrl
.
pointItemPatroltaUrl
,
{
factorI
d
}));
};
};
export
const
queryDevicePointDatas
=
(
i
d
)
=>
{
export
const
queryDevicePointDatas
=
(
factorI
d
)
=>
{
// return commonGet(formatUrl(DeviceURI.dynamicRingDataUrl, { id }));
// return commonGet(formatUrl(DeviceURI.dynamicRingDataUrl, { id }));
return
commonGet
(
formatUrl
(
FscSerUrl
.
pointItemDevicetaUrl
,
{
id
}));
return
commonGet
(
formatUrl
(
FscSerUrl
.
pointItemDevicetaUrl
,
{
factorId
}));
};
};
\ No newline at end of file
export
const
queryPointItemAllDatas
=
(
factorId
)
=>
{
// return commonGet(formatUrl(DeviceURI.dynamicRingDataUrl, { id }));
return
commonGet
(
formatUrl
(
FscSerUrl
.
pointItemAllUrl
,
{
factorId
}));
};
src/view/bank/3dview/points/dialogModel/RiskSourceDetailModal.js
View file @
ace53b11
...
@@ -3,6 +3,8 @@ import PropTypes from 'prop-types';
...
@@ -3,6 +3,8 @@ import PropTypes from 'prop-types';
import
{
CONSTS
}
from
'CONSTS/storageConsts'
;
import
{
CONSTS
}
from
'CONSTS/storageConsts'
;
import
AmosGridTable
from
'../../../../bizview/common/tableComponent/table/AmosGridTable'
;
import
AmosGridTable
from
'../../../../bizview/common/tableComponent/table/AmosGridTable'
;
import
{
riskSoureDetail3dAction
}
from
'SERVICES/bizService'
;
import
{
riskSoureDetail3dAction
}
from
'SERVICES/bizService'
;
import
{
queryPointItemAllDatas
}
from
'../../../../../services/3dService'
;
const
checkListColumns
=
(
self
)
=>
{
const
checkListColumns
=
(
self
)
=>
{
return
[
return
[
...
@@ -23,7 +25,7 @@ const checkListColumns = (self) => {
...
@@ -23,7 +25,7 @@ const checkListColumns = (self) => {
if
(
arr
&&
arr
!==
null
)
{
if
(
arr
&&
arr
!==
null
)
{
arr
.
map
((
e
,
index
)
=>
{
arr
.
map
((
e
,
index
)
=>
{
if
(
0
==
index
)
{
if
(
0
==
index
)
{
let
grandChildItem
=
document
.
createElement
(
'p'
);
let
grandChildItem
=
document
.
createElement
(
'p'
);
grandChildItem
.
innerText
=
"公司:"
;
grandChildItem
.
innerText
=
"公司:"
;
let
font
=
document
.
createElement
(
'font'
);
let
font
=
document
.
createElement
(
'font'
);
...
@@ -32,7 +34,7 @@ const checkListColumns = (self) => {
...
@@ -32,7 +34,7 @@ const checkListColumns = (self) => {
p
.
append
(
grandChildItem
);
p
.
append
(
grandChildItem
);
}
}
if
(
1
==
index
)
{
if
(
1
==
index
)
{
let
grandChildItem
=
document
.
createElement
(
'p'
);
let
grandChildItem
=
document
.
createElement
(
'p'
);
grandChildItem
.
innerText
=
"部门:"
;
grandChildItem
.
innerText
=
"部门:"
;
let
font
=
document
.
createElement
(
'font'
);
let
font
=
document
.
createElement
(
'font'
);
...
@@ -41,7 +43,7 @@ const checkListColumns = (self) => {
...
@@ -41,7 +43,7 @@ const checkListColumns = (self) => {
p
.
append
(
grandChildItem
);
p
.
append
(
grandChildItem
);
}
}
if
(
2
==
index
)
{
if
(
2
==
index
)
{
let
grandChildItem
=
document
.
createElement
(
'p'
);
let
grandChildItem
=
document
.
createElement
(
'p'
);
grandChildItem
.
innerText
=
"班组:"
;
grandChildItem
.
innerText
=
"班组:"
;
let
font
=
document
.
createElement
(
'font'
);
let
font
=
document
.
createElement
(
'font'
);
...
@@ -50,7 +52,7 @@ const checkListColumns = (self) => {
...
@@ -50,7 +52,7 @@ const checkListColumns = (self) => {
p
.
append
(
grandChildItem
);
p
.
append
(
grandChildItem
);
}
}
if
(
3
==
index
)
{
if
(
3
==
index
)
{
let
grandChildItem
=
document
.
createElement
(
'p'
);
let
grandChildItem
=
document
.
createElement
(
'p'
);
grandChildItem
.
innerText
=
"岗位:"
;
grandChildItem
.
innerText
=
"岗位:"
;
let
font
=
document
.
createElement
(
'font'
);
let
font
=
document
.
createElement
(
'font'
);
...
@@ -82,17 +84,83 @@ const checkListColumns = (self) => {
...
@@ -82,17 +84,83 @@ const checkListColumns = (self) => {
};
};
// export const data =
export
const
datamoni
=
{
"id"
:
349
,
"name"
:
"XAP-P-EXD-SW01"
,
"code"
:
"0010020003"
,
"user"
:
null
,
"identificationMethod"
:
null
,
"riskLevel"
:
"3级"
,
"riskType"
:
null
,
"riskFactors"
:
[
{
"id"
:
57
,
"name"
:
"噪音"
,
"type"
:
" , , , "
,
"level"
:
"3级"
,
"controlStatus"
:
""
},
{
"id"
:
58
,
"name"
:
"设备故障"
,
"type"
:
" , , , "
,
"level"
:
"4级"
,
"controlStatus"
:
null
}
],
"riskFactorsControlMeasures"
:
[
{
"id"
:
22
,
"label"
:
"测试"
,
"content"
:
"正文"
},
{
// [
"id"
:
23
,
// {
"label"
:
"测试"
,
// "id": 16,
"content"
:
"正文"
// "name": "Y巡检点就是危险因素",
},
// "type": "公司22,部门,班组,岗位",
{
// "level": "4级",
// "controlStatus": null
"id"
:
24
,
// }
"label"
:
"测试"
,
// ]
"content"
:
"正文"
}
],
"dangerDetails"
:
null
}
const
deviceData
=
[
{
"type"
:
"device"
,
"name"
:
"中心机房新风机"
,
"value"
:
"高湿报警"
,
"identification"
:
"qualified"
,
"factorId"
:
26
}
]
const
patrolData
=
[
{
"type"
:
"patrol"
,
"name"
:
"A02机柜"
,
"value"
:
"【(2U-14U)750服务器01】工作指示灯"
,
"identification"
:
"qualified"
,
"factorId"
:
31
},
{
"type"
:
"patrol"
,
"name"
:
"A02机柜"
,
"value"
:
"【(2U-14U)750服务器01】噪声"
,
"identification"
:
"qualified"
,
"factorId"
:
31
}
]
/**
/**
* 风险详情
* 风险详情
...
@@ -106,7 +174,9 @@ class RiskSourceDetailModal extends Component {
...
@@ -106,7 +174,9 @@ class RiskSourceDetailModal extends Component {
this
.
state
=
{
this
.
state
=
{
selectedRows
:
[],
selectedRows
:
[],
selectedRowKeys
:
[],
selectedRowKeys
:
[],
data
:
{}
data
:
{},
patroList
:
[],
deviceList
:[]
};
};
}
}
...
@@ -123,8 +193,29 @@ class RiskSourceDetailModal extends Component {
...
@@ -123,8 +193,29 @@ class RiskSourceDetailModal extends Component {
}
}
queryRiskSoureDetail
=
(
riskSourceId
)
=>
{
queryRiskSoureDetail
=
(
riskSourceId
)
=>
{
riskSoureDetail3dAction
(
riskSourceId
).
then
(
data
=>
{
riskSoureDetail3dAction
(
riskSourceId
).
then
(
data
=>
{
this
.
setState
({
data
});
this
.
setState
({
data
});
data
.
riskFactors
.
map
(
e
=>
{
let
{
patroList
,
deviceList
}
=
this
.
state
;
queryPointItemAllDatas
(
e
.
id
).
then
(
datas
=>
{
datas
.
patrol
&&
datas
.
patrol
.
map
(
item
=>
{
patroList
.
push
(
item
)
})
datas
.
device
&&
datas
.
device
.
map
(
item
=>
{
deviceList
.
push
(
item
)
})
this
.
setState
({
patroList
:
patroList
,
deviceList
:
deviceList
});
})
})
});
});
}
}
/**
/**
...
@@ -142,18 +233,82 @@ class RiskSourceDetailModal extends Component {
...
@@ -142,18 +233,82 @@ class RiskSourceDetailModal extends Component {
);
);
};
};
renderDanger
=
(
danger
)
=>
{
// renderDanger = (danger) => {
return
(
danger
||
[]).
map
(
item
=>
{
// return (danger || []).map(item => {
return
(
<
p
key
=
{
item
.
id
}
>
// return (<p >
<
span
>
{
item
.
label
}
&
nbsp
;
<
/span
>
// <span>{item.label} </span>
<
span
>
{
item
.
content
}
:
<
/span
>
// <span>{item.content}:</span>
<
span
style
=
{{
color
:
'#FF0000'
}}
>
管控措施失效
<
/span
>
// <span style={{ color: '#FF0000' }}>管控措施失效</span>
// </p>);
// });
// }
renderDangersPatrol
=
(
danger
)
=>
{
return
(
danger
||
[]).
map
(
item
=>
{
if
(
item
&&
item
.
identification
===
"unqualified"
){
return
(
<
p
>
<
font
style
=
{{
color
:
'#FF0000'
}}
>
巡检不合格:
<
/font
>
<
span
>
{
item
.
name
}
&
nbsp
;
<
/span
>
<
span
>
{
item
.
value
}
&
nbsp
;
<
/span
>
<
/p>
)
;
<
/p>
)
;
});
}
})
// return (danger || []).map(item => {
// return (<p > <font style={{ color: '#FF0000' }}>巡检不合格:</font>
// <span>{item.name} </span>
// <span>{item.value} </span>
// </p>);
// });
}
renderDangersDevice
=
(
danger
)
=>
{
// return (danger || []).map(item => {
// return (<p > <font style={{ color: '#FF0000' }}>设备告警:</font>
// <span>{item.name} </span>
// <span>{item.value} </span>
// </p>);
// });
return
(
danger
||
[]).
map
(
item
=>
{
if
(
item
&&
item
.
identification
===
"unqualified"
){
return
(
<
p
>
<
font
style
=
{{
color
:
'#FF0000'
}}
>
设备告警:
<
/font
>
<
span
>
{
item
.
name
}
&
nbsp
;
<
/span
>
<
span
>
{
item
.
value
}
&
nbsp
;
<
/span
>
<
/p>
)
;
}
})
}
}
handledata
=
(
data
,
patroList
,
deviceList
)
=>
{
if
(
data
.
riskFactors
){
data
.
riskFactors
.
map
(
e
=>
{
e
.
controlStatus
=
"受控"
;
})
data
.
riskFactors
.
map
(
item
=>
{
patroList
.
map
(
p
=>
{
if
(
item
.
id
=
p
.
factorId
&&
p
.
identification
===
"unqualified"
){
item
.
controlStatus
=
"失效"
;
}
})
deviceList
.
map
(
p
=>
{
if
(
item
.
id
=
p
.
factorId
&&
p
.
identification
===
"unqualified"
){
item
.
controlStatus
=
"失效"
;
}
})
})
}
return
data
;
}
render
()
{
render
()
{
const
{
data
=
{}
}
=
this
.
state
;
let
{
data
=
{}
}
=
this
.
state
;
let
{
patroList
,
deviceList
}
=
this
.
state
;
let
newData
=
this
.
handledata
(
data
,
patroList
,
deviceList
);
return
(
return
(
<
div
className
=
"risk-warn"
>
<
div
className
=
"risk-warn"
>
<
div
className
=
"risk-source-header"
>
<
div
className
=
"risk-source-header"
>
...
@@ -168,12 +323,13 @@ class RiskSourceDetailModal extends Component {
...
@@ -168,12 +323,13 @@ class RiskSourceDetailModal extends Component {
callBack
=
{
this
.
reload
}
callBack
=
{
this
.
reload
}
isPageable
=
{
false
}
isPageable
=
{
false
}
isChecked
=
{
false
}
isChecked
=
{
false
}
dataList
=
{
d
ata
.
riskFactors
||
[]}
dataList
=
{
newD
ata
.
riskFactors
||
[]}
/
>
/
>
<
/div
>
<
/div
>
<
div
className
=
"risk-warn-content"
>
<
div
className
=
"risk-warn-content"
>
<
div
className
=
"risk-warn-content-header"
>
隐患:
<
/div
>
<
div
className
=
"risk-warn-content-header"
>
风险触发原因:巡检不合格
/
设备告警
<
/div
>
{
data
.
riskFactorsControlMeasures
&&
this
.
renderDanger
(
data
.
riskFactorsControlMeasures
)}
{
patroList
&&
this
.
renderDangersPatrol
(
patroList
)}
{
deviceList
&&
this
.
renderDangersDevice
(
deviceList
)}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
);
);
...
...
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