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
15438e70
Commit
15438e70
authored
Sep 09, 2020
by
张展弋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成“换流站系统风险区域数据同步至仓库货位”同步推送功能
parent
8b1c9401
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
6 deletions
+32
-6
urlConsts.js
src/consts/urlConsts.js
+1
-0
preControlService.js
src/services/preControlService.js
+6
-2
index.js
src/view/bizview/preControl/riskModel/index.js
+25
-4
No files found.
src/consts/urlConsts.js
View file @
15438e70
...
...
@@ -165,6 +165,7 @@ export const FasSerUrl = {
matchEquipmentBindUrl
:
completePrefix
(
baseURI
,
'api/impEquip/{id}/fireeqmt'
),
// 绑定配套设备
equipmentPrePlanPictureUrl
:
completePrefix
(
baseURI
,
'api/impEquip/pre-picture?equipId={equipmentId}&type={type}'
)
,
//获取重点设备预控图
riskSourceTreeUrl
:
completePrefix
(
baseURI
,
'api/risksource/riskSourceTress'
),
//风险点树查询
synToEquipManageUrl
:
completePrefix
(
baseURI
,
'api/risksource/synToEquipManage'
),
//将本地 风险模型推送到远程同步
regionTreeUrl
:
completePrefix
(
baseURI
,
'api/risksource/regionTress'
),
//风险点树查询
riskSourceEditUrl
:
completePrefix
(
baseURI
,
'api/riskModel/riskSource/editRiskSource'
),
//风险点编辑
riskSourceDeleteUrl
:
completePrefix
(
baseURI
,
'api/riskModel/riskSource/deleteRiskSource'
),
//风险点删除
...
...
src/services/preControlService.js
View file @
15438e70
...
...
@@ -58,6 +58,10 @@ export const queryRiskSourceTreeAction = () => {
return
commonGet
(
formatUrl
(
FasSerUrl
.
riskSourceTreeUrl
),
{});
};
export
const
synToEquipManageAction
=
()
=>
{
return
commonPut
(
formatUrl
(
FasSerUrl
.
synToEquipManageUrl
,
{}));
};
export
const
riskSourceEditAction
=
(
body
)
=>
{
return
commonPost
(
formatUrl
(
FasSerUrl
.
riskSourceEditUrl
),
body
);
};
...
...
@@ -266,4 +270,5 @@ export const getManageLevelEumListAction = () => {
*/
export
const
queryRegionTreeAction
=
()
=>
{
return
commonGet
(
formatUrl
(
FasSerUrl
.
regionTreeUrl
),
{});
};
\ No newline at end of file
};
src/view/bizview/preControl/riskModel/index.js
View file @
15438e70
...
...
@@ -3,6 +3,7 @@ import { Tabs } from 'amos-antd';
import
{
Modal
,
AmosAlert
,
Tree
,
Button
,
SplitPane
}
from
'amos-framework'
;
import
{
queryRiskSourceTreeAction
,
synToEquipManageAction
,
riskSourceEditAction
,
riskSourceDeleteAction
,
fmeaPageListAction
,
...
...
@@ -518,6 +519,23 @@ class RiskModel extends Component {
// }
}
synToEquipManage
=
()
=>
{
AmosAlert
.
confirm
(
'提示'
,
'如果远程系统已运行且有数据,则旧数据可能会被覆盖,导致系统异常,确定要同步数据么'
,
{
callback
:
flag
=>
{
if
(
flag
)
{
// 确定
synToEquipManageAction
().
then
(
data
=>
{
AmosAlert
.
success
(
'提示'
,
'同步成功'
);
},
err
=>
{
AmosAlert
.
error
(
'错误'
,
err
);
}
);
}
}
});
}
riskSourceDelete
=
(
id
,
length
)
=>
{
AmosAlert
.
confirm
(
'提示'
,
this
.
getDeteleConfirmByLength
(
length
),
{
callback
:
flag
=>
{
...
...
@@ -694,8 +712,10 @@ class RiskModel extends Component {
getTreeNodeTypeAction
(
id
).
then
(
data
=>
{
this
.
setState
({
modal
:
true
,
modelFlag
:
'risk'
,
toolBarFlag
:
'2'
,
treeNodeType
:
data
});
});
}
else
{
}
else
if
(
value
===
'3'
)
{
this
.
riskSourceDelete
(
idsArry
,
childrenLength
);
}
else
{
this
.
synToEquipManage
();
}
this
.
setState
({
rightClickNodeTreeItem
:
null
});
}
...
...
@@ -712,15 +732,16 @@ class RiskModel extends Component {
top
:
`
${
pageY
-
45
}
px`
,
backgroundColor
:
'#ffffff'
,
border
:
'solid'
,
height
:
isRegion
===
'TRUE'
?
'1
05
px'
:
'70px'
,
height
:
isRegion
===
'TRUE'
?
'1
40
px'
:
'70px'
,
borderWidth
:
'1px'
,
borderColor
:
'#c9c9c9'
};
const
menu
=
(
<
div
style
=
{
tmpStyle
}
>
{
isRegion
===
'TRUE'
&&
<
Button
icon
=
{
<
BizIcon
icon
=
"tianjia"
/>
}
onClick
=
{()
=>
this
.
onButtonClick
(
'1'
)}
className
=
'risk-model-button'
transparent
>
添加
<
/Button>
}
<
Button
icon
=
{
<
BizIcon
icon
=
"xiugai"
/>
}
onClick
=
{()
=>
this
.
onButtonClick
(
'2'
)}
className
=
'risk-model-button'
transparent
>
编辑
<
/Button
>
<
Button
icon
=
{
<
BizIcon
icon
=
"shanchu"
/>
}
onClick
=
{()
=>
this
.
onButtonClick
(
'3'
)}
className
=
'risk-model-button'
transparent
>
删除
<
/Button
>
<
Button
icon
=
{
<
BizIcon
icon
=
"xiugai"
/>
}
onClick
=
{()
=>
this
.
onButtonClick
(
'2'
)}
className
=
'risk-model-button'
transparent
>
编辑
<
/Button
>
<
Button
icon
=
{
<
BizIcon
icon
=
"shanchu"
/>
}
onClick
=
{()
=>
this
.
onButtonClick
(
'3'
)}
className
=
'risk-model-button'
transparent
>
删除
<
/Button
>
{
isRegion
===
'TRUE'
&&
<
Button
icon
=
{
<
BizIcon
icon
=
"qianyi"
/>
}
onClick
=
{()
=>
this
.
onButtonClick
(
'4'
)}
className
=
'risk-model-button'
transparent
>
同步推送
<
/Button>
}
<
/div
>
);
return
this
.
state
.
rightClickNodeTreeItem
?
menu
:
''
;
...
...
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