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
bc0a440a
Commit
bc0a440a
authored
Feb 17, 2020
by
taabe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
98bed1c1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
74 additions
and
20 deletions
+74
-20
.gitignore
.gitignore
+3
-0
riskModel.scss
src/styles/view/biz/riskModel/riskModel.scss
+9
-1
FmeaTable.js
src/view/bizview/preControl/riskModel/FmeaTable.js
+34
-13
index.js
src/view/bizview/preControl/riskModel/index.js
+5
-1
EvaluationModel.js
...iew/bizview/preControl/riskModel/model/EvaluationModel.js
+3
-0
RiskFactorModel.js
...iew/bizview/preControl/riskModel/model/RiskFactorModel.js
+20
-5
No files found.
.gitignore
View file @
bc0a440a
node_modules
released
dist
zip
src/styles/view/biz/riskModel/riskModel.scss
View file @
bc0a440a
...
...
@@ -145,6 +145,14 @@
background
:
white
;
}
}
.amos-radio-disabled
{
.amos-radio-status
{
&
:
:
after
{
background-color
:
#19afff
!
important
;
}
}
}
}
.risk-model-table
{
...
...
@@ -154,7 +162,7 @@
overflow-x
:
scroll
;
.grid-content
{
width
:
15
00px
;
width
:
20
00px
;
}
}
...
...
src/view/bizview/preControl/riskModel/FmeaTable.js
View file @
bc0a440a
...
...
@@ -10,7 +10,7 @@ const getColumns = (self) => {
title
:
'危险因素'
,
dataIndex
:
'riskFactorName'
,
key
:
'riskFactorName'
,
width
:
'
8
%'
,
width
:
'
7
%'
,
className
:
'uant-table-thead'
},
{
...
...
@@ -31,21 +31,21 @@ const getColumns = (self) => {
title
:
'严重度Si'
,
dataIndex
:
'evaluationS'
,
key
:
'evaluationS'
,
width
:
'
5
%'
,
width
:
'
4
%'
,
className
:
'uant-table-thead'
},
{
title
:
'故障频数Oi'
,
dataIndex
:
'evaluationO'
,
key
:
'evaluationO'
,
width
:
'
5
%'
,
width
:
'
4
%'
,
className
:
'uant-table-thead'
},
{
title
:
'探测度Di'
,
dataIndex
:
'evaluationD'
,
key
:
'evaluationD'
,
width
:
'
5
%'
,
width
:
'
4
%'
,
className
:
'uant-table-thead'
},{
title
:
'RPNi'
,
...
...
@@ -59,44 +59,65 @@ const getColumns = (self) => {
title
:
'工程措施'
,
dataIndex
:
'engineering'
,
key
:
'engineering'
,
width
:
'
9
%'
,
width
:
'
8
%'
,
className
:
'uant-table-thead'
},{
title
:
'管理措施'
,
dataIndex
:
'management'
,
key
:
'management'
,
width
:
'
9
%'
,
width
:
'
8
%'
,
className
:
'uant-table-thead'
},{
title
:
'培训教育'
,
dataIndex
:
'train'
,
key
:
'train'
,
width
:
'
9
%'
,
width
:
'
8
%'
,
className
:
'uant-table-thead'
},{
title
:
'个体防护'
,
dataIndex
:
'protection'
,
key
:
'protection'
,
width
:
'
9
%'
,
width
:
'
8
%'
,
className
:
'uant-table-thead'
},{
title
:
'应急处置'
,
dataIndex
:
'disposal'
,
key
:
'disposal'
,
width
:
'
9
%'
,
width
:
'
8
%'
,
className
:
'uant-table-thead'
}]
},{
title
:
'责任人'
,
dataIndex
:
'charger'
,
key
:
'charger'
,
width
:
'5%'
,
children
:
[{
title
:
'公司责任人'
,
dataIndex
:
'companyLeaderName'
,
key
:
'companyLeaderName'
,
width
:
'4%'
,
className
:
'uant-table-thead'
},{
title
:
'部门责任人'
,
dataIndex
:
'departmentLeaderName'
,
key
:
'departmentLeaderName'
,
width
:
'4%'
,
className
:
'uant-table-thead'
},{
title
:
'班组责任人'
,
dataIndex
:
'groupLeaderName'
,
key
:
'groupLeaderName'
,
width
:
'4%'
,
className
:
'uant-table-thead'
},{
title
:
'个人责任人'
,
dataIndex
:
'personLeaderName'
,
key
:
'personLeaderName'
,
width
:
'4%'
,
className
:
'uant-table-thead'
}]
},{
title
:
'管控对象'
,
dataIndex
:
'controlObj'
,
key
:
'controlObj'
,
width
:
'
5
%'
,
width
:
'
4
%'
,
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
span
>
...
...
src/view/bizview/preControl/riskModel/index.js
View file @
bc0a440a
...
...
@@ -325,6 +325,7 @@ class RiskModel extends Component {
});
}
else
if
(
modelFlag
===
'fmea'
)
{
if
(
riskSourceId
)
{
let
{
node
}
=
this
.
state
;
Object
.
assign
(
form
,
{
'riskSourceId'
:
riskSourceId
});
this
.
model
.
form
.
validate
((
valid
,
dataValues
)
=>
{
if
(
valid
)
{
...
...
@@ -341,7 +342,7 @@ class RiskModel extends Component {
});
}
this
.
femaEdit
(
fmeaObjList
);
this
.
setState
({
modal
:
false
});
this
.
setState
({
modal
:
false
}
,
()
=>
this
.
refeshRiskSourceDetail
(
node
.
id
)
);
}
else
{
return
false
;
}
...
...
@@ -510,6 +511,7 @@ class RiskModel extends Component {
fmeaDelete
=
(
fmeaIds
,
riskSourceId
)
=>
{
// let id = record.id;
let
{
node
}
=
this
.
state
;
AmosAlert
.
confirm
(
'提示'
,
'确定要删除么?'
,
{
callback
:
flag
=>
{
if
(
flag
)
{
...
...
@@ -519,6 +521,7 @@ class RiskModel extends Component {
AmosAlert
.
success
(
'提示'
,
'删除成功'
);
this
.
reload
();
// this.updateRiskSourceRpni(riskSourceId);
this
.
refeshRiskSourceDetail
(
node
.
id
);
},
err
=>
{
AmosAlert
.
error
(
'错误'
,
err
);
...
...
@@ -672,6 +675,7 @@ class RiskModel extends Component {
onSelect
=
(
selectedKeys
,
e
)
=>
{
this
.
remove
(
'2'
);
this
.
fmeaRef
&&
this
.
fmeaRef
.
setState
({
selectedRowKeys
:
[],
selectedRows
:
[]
});
this
.
setState
({
isRegion
:
e
.
node
.
props
.
isRegion
,
node
:
e
.
node
.
props
,
...
...
src/view/bizview/preControl/riskModel/model/EvaluationModel.js
View file @
bc0a440a
...
...
@@ -198,6 +198,7 @@ class EvaluationModel extends Component {
<
Select
className
=
"fmea-model-select"
data
=
{
sData
}
searchable
renderOption
=
{
item
=>
<
Option
value
=
{
parseInt
(
item
.
id
)}
>
{
item
.
coefficient
}
-
{
item
.
influence
}
<
/Option>
}
value
=
{
parseInt
(
form
.
evaluationSid
)}
onChange
=
{(
e
,
item
)
=>
this
.
onSelectChange
(
'evaluationSid'
,
e
,
item
)}
...
...
@@ -207,6 +208,7 @@ class EvaluationModel extends Component {
<
Select
className
=
"fmea-model-select"
data
=
{
oData
}
searchable
renderOption
=
{
item
=>
(
<
Option
value
=
{
parseInt
(
item
.
id
)}
>
{
item
.
coefficient
}
-
{
item
.
influence
}
-
{
item
.
describe
}
...
...
@@ -220,6 +222,7 @@ class EvaluationModel extends Component {
<
Select
className
=
"fmea-model-select"
data
=
{
dData
}
searchable
renderOption
=
{
item
=>
(
<
Option
value
=
{
parseInt
(
item
.
id
)}
>
{
item
.
coefficient
}
-
{
item
.
describe
}
...
...
src/view/bizview/preControl/riskModel/model/RiskFactorModel.js
View file @
bc0a440a
import
React
,
{
Component
}
from
'react'
;
import
{
Form
,
Input
,
Select
,
Divider
,
MultiSelect
}
from
'amos-framework'
;
import
{
accidentTypeNoPageAction
,
queryRiskFactorNoPageAction
,
queryEvaModelAction
}
from
'../../../../../services/preControlService'
;
import
{
accidentTypeNoPageAction
,
queryRiskFactorNoPageAction
,
queryEvaModelAction
,
queryAllUserAction
}
from
'../../../../../services/preControlService'
;
const
FormItem
=
Form
.
Item
;
const
Option
=
Select
.
Option
;
...
...
@@ -20,6 +21,7 @@ class RiskFactorModel extends Component {
identifyMethod
:
''
},
riskFactorData
:
[],
userData
:
[],
rules
:
{
riskFactorIds
:
[{
required
:
true
,
message
:
'危险因素不能为空'
}]
}
...
...
@@ -34,6 +36,7 @@ class RiskFactorModel extends Component {
componentDidMount
=
()
=>
{
this
.
getRiskFactorData
();
this
.
getUser
();
};
...
...
@@ -65,8 +68,14 @@ class RiskFactorModel extends Component {
});
};
getUser
=
()
=>
{
queryAllUserAction
().
then
(
data
=>
{
this
.
setState
({
userData
:
data
});
});
}
render
()
{
const
{
form
,
rules
,
riskFactorData
}
=
this
.
state
;
const
{
form
,
rules
,
riskFactorData
,
userData
}
=
this
.
state
;
const
formItemLayout
=
{
labelCol
:
{
xs
:
{
span
:
24
},
...
...
@@ -86,12 +95,18 @@ class RiskFactorModel extends Component {
<
span
className
=
"fmea-item-span"
>
基本信息:
<
/span
>
<
Divider
/>
<
FormItem
label
=
{
<
span
>
辨识人
<
/span>} className="fmea-item-influence" field="identifyUser" {...formItemLayout}
>
<
Input
className
=
"risk_factor_input"
value
=
{
form
.
influence
}
onChange
=
{
e
=>
this
.
onSelectChange
(
'influence'
,
e
.
target
.
value
)}
/
>
<
Select
className
=
"fmea-model-select"
data
=
{
userData
}
renderOption
=
{
item
=>
<
Option
value
=
{
parseInt
(
item
.
id
)}
>
{
item
.
name
}
<
/Option>
}
value
=
{
parseInt
(
form
.
identifyUser
)}
onChange
=
{(
e
,
item
)
=>
this
.
onSelectChange
(
'identifyUser'
,
e
,
item
)}
/
>
<
/FormItem
>
<
FormItem
label
=
{
<
span
>
辨识方法
<
/span>} className="fmea-item-influence" field="identifyMethod" {...formItemLayout}
>
<
Input
className
=
"risk_factor_input"
value
=
{
form
.
i
nfluence
}
onChange
=
{
e
=>
this
.
onSelectChange
(
'influence
'
,
e
.
target
.
value
)}
/
>
<
Input
className
=
"risk_factor_input"
value
=
{
form
.
i
dentifyMethod
}
onChange
=
{
e
=>
this
.
onSelectChange
(
'identifyMethod
'
,
e
.
target
.
value
)}
/
>
<
/FormItem
>
<
span
className
=
"fmea-item-span"
>
失
危险有害因素:
<
/span
>
<
span
className
=
"fmea-item-span"
>
危险有害因素:
<
/span
>
<
Divider
/>
<
FormItem
label
=
{
<
span
>
危险因素
<
/span>} className="fmea-item-risk-factor" field="riskFactorsId" {...formItemLayout}
>
<
div
className
=
"risk-factor-select"
style
=
{{
height
:
'200px'
}}
>
...
...
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