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
927d5d48
Commit
927d5d48
authored
Feb 24, 2020
by
taabe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加查询危险因素关联对象个数接口
parent
d54c4d65
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
8 deletions
+28
-8
urlConsts.js
src/consts/urlConsts.js
+2
-1
preControlService.js
src/services/preControlService.js
+5
-0
AssociatedPointTable.js
...view/bizview/preControl/riskModel/AssociatedPointTable.js
+3
-0
index.js
src/view/bizview/preControl/riskModel/index.js
+18
-7
No files found.
src/consts/urlConsts.js
View file @
927d5d48
...
...
@@ -217,7 +217,8 @@ export const FasSerUrl = {
getTextPlanUrl
:
completePrefix
(
baseURI
,
'api/visual/plan/text/{id}'
),
//获取文字预案信息
uploadTextPlan
:
completePrefix
(
baseURI
,
'file/plan/{appId}/texts'
),
getTreeNodeTypeUrl
:
completePrefix
(
baseURI
,
'api/riskModel/riskSource/getChildTypeByPid?riskSourceId={riskSourceId}'
),
// 根据节点ID获取子节点可能的类型
getAllUserUrl
:
completePrefix
(
baseURI
,
'api/common/user/list'
)
//获取所有用户
getAllUserUrl
:
completePrefix
(
baseURI
,
'api/common/user/list'
),
//获取所有用户
queryFmeaControlObjUrl
:
endConf
.
completePrifix
(
baseURI
,
'api/riskModel/fmea/{ids}/controlObjCount'
)
//根据fmea id查询关联对象个数
};
...
...
src/services/preControlService.js
View file @
927d5d48
...
...
@@ -155,6 +155,11 @@ export const getTreeNodeTypeAction = (riskSourceId) => {
return
commonGet
(
url
);
};
export
const
queryFmeaControlObjAction
=
(
ids
)
=>
{
let
url
=
formatUrl
(
FasSerUrl
.
queryFmeaControlObjUrl
,
{
ids
});
return
commonGet
(
url
);
};
/**
* 获取预案树
*/
...
...
src/view/bizview/preControl/riskModel/AssociatedPointTable.js
View file @
927d5d48
...
...
@@ -167,6 +167,9 @@ class AssociatedPointTable extends Component {
}
AssociatedPointTable
.
propTypes
=
{
dataList
:
PropTypes
.
array
,
fetchData
:
PropTypes
.
func
,
totalCount
:
PropTypes
.
number
};
export
default
AssociatedPointTable
;
src/view/bizview/preControl/riskModel/index.js
View file @
927d5d48
...
...
@@ -16,7 +16,8 @@ import {
deleteAssoPointAction
,
queryRiskSourceDetailAction
,
updateRiskSourceRpniAction
,
getTreeNodeTypeAction
getTreeNodeTypeAction
,
queryFmeaControlObjAction
}
from
'../../../../services/preControlService'
;
import
ToolBar
from
'./common/ToolBar'
;
import
FmeaTable
from
'./FmeaTable'
;
...
...
@@ -314,7 +315,11 @@ class RiskModel extends Component {
deleteParamByActiveKey
=
(
selectedRowKeys
,
selectedRows
,
activeKey
,
subActiveKey
)
=>
{
if
(
activeKey
===
'1'
){
let
record
=
selectedRows
[
0
];
this
.
fmeaDelete
(
selectedRowKeys
,
record
.
riskSourceId
);
let
ids
=
[];
selectedRows
.
map
(
r
=>
ids
.
push
(
r
.
id
));
queryFmeaControlObjAction
(
ids
).
then
(
data
=>
{
this
.
fmeaDelete
(
selectedRowKeys
,
selectedRows
,
record
.
riskSourceId
,
data
.
dataList
);
});
}
else
if
(
activeKey
===
'2'
&&
subActiveKey
===
'2-1'
){
this
.
deleteAssoPoint
(
selectedRows
);
}
else
if
(
activeKey
===
'2'
&&
subActiveKey
===
'2-2'
){
...
...
@@ -533,10 +538,16 @@ class RiskModel extends Component {
);
};
fmeaDelete
=
(
fmeaIds
,
riskSourceId
)
=>
{
// let id = record.id;
fmeaDelete
=
(
fmeaIds
,
selectedRows
,
riskSourceId
,
associatedObjCount
)
=>
{
let
{
node
}
=
this
.
state
;
AmosAlert
.
confirm
(
'提示'
,
'确定要删除么?'
,
{
let
doubleConfirm
=
false
;
selectedRows
.
map
(
row
=>
{
if
(
row
.
evaluationOid
>
0
)
{
doubleConfirm
=
true
;
}
});
let
msg
=
(
doubleConfirm
||
associatedObjCount
>
0
)
?
'删除后会清空评价和关联对象相关数据,是否确认删除?'
:
'确定要删除么?'
;
AmosAlert
.
confirm
(
'提示'
,
msg
,
{
callback
:
flag
=>
{
if
(
flag
)
{
// 确定
...
...
@@ -774,7 +785,7 @@ class RiskModel extends Component {
remove
=
(
targetKey
)
=>
{
const
panes
=
this
.
state
.
panes
.
filter
(
pane
=>
pane
.
key
!==
targetKey
);
this
.
setState
({
panes
,
activeKey
:
'1'
});
this
.
setState
({
panes
,
activeKey
:
'1'
,
pointData
:
[],
equipData
:
[],
pointDataTotalNum
:
0
,
equipDataTotalNum
:
0
});
}
add
=
()
=>
{
...
...
@@ -782,7 +793,7 @@ class RiskModel extends Component {
const
activeKey
=
'2'
;
let
pane
=
panes
.
filter
(
pane
=>
pane
.
key
===
activeKey
);
pane
.
length
===
0
&&
panes
.
push
({
title
:
'关联对象'
,
content
:
'关联对象'
,
key
:
activeKey
});
this
.
setState
({
panes
,
activeKey
});
this
.
setState
({
panes
,
activeKey
,
pointData
:
[],
equipData
:
[],
pointDataTotalNum
:
0
,
equipDataTotalNum
:
0
});
}
getTabPaneContent
=
(
key
)
=>
{
...
...
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