Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
station-elec-manage-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
station-elec-manage-view
Commits
5d30068f
Commit
5d30068f
authored
May 26, 2020
by
zhengjiangtao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
安全巡检模块
parent
4ad96e5e
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
727 additions
and
4 deletions
+727
-4
asyncView.js
src/routes/asyncView.js
+5
-2
view.js
src/routes/view.js
+5
-2
index.scss
src/styles/view/index.scss
+3
-0
safetyInspection.scss
src/styles/view/monitor/safetyInspection.scss
+145
-0
SafetyInspectionLeft.js
src/view/monitor/safetyInspection/SafetyInspectionLeft.js
+546
-0
index.js
src/view/monitor/safetyInspection/index.js
+23
-0
No files found.
src/routes/asyncView.js
View file @
5d30068f
...
@@ -12,6 +12,7 @@ const AsyncRootBizView = props => <AsyncLoader load={import('./../view/biz/index
...
@@ -12,6 +12,7 @@ const AsyncRootBizView = props => <AsyncLoader load={import('./../view/biz/index
const
AsyncSafetyTraining
=
props
=>
<
AsyncLoader
load
=
{
import
(
'../view/monitor/safetyManage/index'
)}
componentProps
=
{
props
}
/>
;
const
AsyncSafetyTraining
=
props
=>
<
AsyncLoader
load
=
{
import
(
'../view/monitor/safetyManage/index'
)}
componentProps
=
{
props
}
/>
;
const
AsyncDaliyTraining
=
props
=>
<
AsyncLoader
load
=
{
import
(
'../view/monitor/dailyTrain/index'
)}
componentProps
=
{
props
}
/>
;
const
AsyncDaliyTraining
=
props
=>
<
AsyncLoader
load
=
{
import
(
'../view/monitor/dailyTrain/index'
)}
componentProps
=
{
props
}
/>
;
const
AsyncEquipmentMaintain
=
props
=>
<
AsyncLoader
load
=
{
import
(
'../view/monitor/equipmentMaintain/index'
)}
componentProps
=
{
props
}
/>
;
const
AsyncEquipmentMaintain
=
props
=>
<
AsyncLoader
load
=
{
import
(
'../view/monitor/equipmentMaintain/index'
)}
componentProps
=
{
props
}
/>
;
const
AsyncSafetyInspection
=
props
=>
<
AsyncLoader
load
=
{
import
(
'../view/monitor/safetyInspection/index'
)}
componentProps
=
{
props
}
/>
;
// const AsyncRegionList = props => <AsyncLoader load={import('./../view/common/region/index')} componentProps={props} />;
// const AsyncRegionList = props => <AsyncLoader load={import('./../view/common/region/index')} componentProps={props} />;
...
@@ -23,14 +24,16 @@ const Routes = {
...
@@ -23,14 +24,16 @@ const Routes = {
bills
:
AsyncBills
,
bills
:
AsyncBills
,
safetyTraining
:
AsyncSafetyTraining
,
safetyTraining
:
AsyncSafetyTraining
,
dailyTrain
:
AsyncDaliyTraining
,
dailyTrain
:
AsyncDaliyTraining
,
equipmentMaintain
:
AsyncEquipmentMaintain
equipmentMaintain
:
AsyncEquipmentMaintain
,
safetyInspection
:
AsyncSafetyInspection
};
};
export
const
businessRouts
=
[
export
const
businessRouts
=
[
{
path
:
'situation'
,
group
:
'biz'
,
component
:
AsyncSituation
,
childRoutes
:
[]
},
{
path
:
'situation'
,
group
:
'biz'
,
component
:
AsyncSituation
,
childRoutes
:
[]
},
{
path
:
'safetyTraining'
,
group
:
'biz'
,
component
:
AsyncSafetyTraining
,
childRoutes
:
[]
},
{
path
:
'safetyTraining'
,
group
:
'biz'
,
component
:
AsyncSafetyTraining
,
childRoutes
:
[]
},
{
path
:
'bills'
,
group
:
'biz'
,
component
:
AsyncBills
,
childRoutes
:
[]
},
{
path
:
'bills'
,
group
:
'biz'
,
component
:
AsyncBills
,
childRoutes
:
[]
},
{
path
:
'dailyTrain'
,
group
:
'biz'
,
component
:
AsyncDaliyTraining
,
childRoutes
:
[]
},
{
path
:
'dailyTrain'
,
group
:
'biz'
,
component
:
AsyncDaliyTraining
,
childRoutes
:
[]
},
{
path
:
'equipmentMaintain'
,
group
:
'biz'
,
component
:
AsyncEquipmentMaintain
,
childRoutes
:
[]
}
{
path
:
'equipmentMaintain'
,
group
:
'biz'
,
component
:
AsyncEquipmentMaintain
,
childRoutes
:
[]
},
{
path
:
'safetyInspection'
,
group
:
'biz'
,
component
:
AsyncSafetyInspection
,
childRoutes
:
[]
}
];
];
const
pageCompontent
=
key
=>
{
const
pageCompontent
=
key
=>
{
return
Routes
[
key
]
||
AsyncEmptyPage
;
return
Routes
[
key
]
||
AsyncEmptyPage
;
...
...
src/routes/view.js
View file @
5d30068f
...
@@ -9,6 +9,7 @@ import EmptyPage from './../view/common/emptyPage/EmptyPage';
...
@@ -9,6 +9,7 @@ import EmptyPage from './../view/common/emptyPage/EmptyPage';
import
SafetyTraining
from
'./../view/monitor/safetyManage/index'
;
import
SafetyTraining
from
'./../view/monitor/safetyManage/index'
;
import
DaliyTraining
from
'./../view/monitor/dailyTrain/index'
;
import
DaliyTraining
from
'./../view/monitor/dailyTrain/index'
;
import
EquipmentMaintain
from
'./../view/monitor/equipmentMaintain/index'
;
import
EquipmentMaintain
from
'./../view/monitor/equipmentMaintain/index'
;
import
SafetyInspection
from
'./../view/monitor/safetyInspection/index'
;
const
Routes
=
{
const
Routes
=
{
main
:
RootView
,
main
:
RootView
,
...
@@ -18,14 +19,16 @@ const Routes = {
...
@@ -18,14 +19,16 @@ const Routes = {
bills
:
Bills
,
bills
:
Bills
,
safetyTraining
:
SafetyTraining
,
safetyTraining
:
SafetyTraining
,
dailyTrain
:
DaliyTraining
,
dailyTrain
:
DaliyTraining
,
equipmentMaintain
:
EquipmentMaintain
equipmentMaintain
:
EquipmentMaintain
,
safetyInspection
:
SafetyInspection
};
};
export
const
businessRouts
=
[
export
const
businessRouts
=
[
{
path
:
'situation'
,
group
:
'biz'
,
component
:
Situation
,
childRoutes
:
[]
},
{
path
:
'situation'
,
group
:
'biz'
,
component
:
Situation
,
childRoutes
:
[]
},
{
path
:
'bills'
,
group
:
'biz'
,
component
:
Bills
,
childRoutes
:
[]
},
{
path
:
'bills'
,
group
:
'biz'
,
component
:
Bills
,
childRoutes
:
[]
},
{
path
:
'safetyTraining'
,
group
:
'biz'
,
component
:
SafetyTraining
,
childRoutes
:
[]
},
{
path
:
'safetyTraining'
,
group
:
'biz'
,
component
:
SafetyTraining
,
childRoutes
:
[]
},
{
path
:
'dailyTrain'
,
group
:
'biz'
,
component
:
DaliyTraining
,
childRoutes
:
[]
},
{
path
:
'dailyTrain'
,
group
:
'biz'
,
component
:
DaliyTraining
,
childRoutes
:
[]
},
{
path
:
'equipmentMaintain'
,
group
:
'biz'
,
component
:
EquipmentMaintain
,
childRoutes
:
[]
}
{
path
:
'equipmentMaintain'
,
group
:
'biz'
,
component
:
EquipmentMaintain
,
childRoutes
:
[]
},
{
path
:
'safetyInspection'
,
group
:
'biz'
,
component
:
SafetyInspection
,
childRoutes
:
[]
}
];
];
const
pageCompontent
=
key
=>
{
const
pageCompontent
=
key
=>
{
return
Routes
[
key
]
||
EmptyPage
;
return
Routes
[
key
]
||
EmptyPage
;
...
...
src/styles/view/index.scss
View file @
5d30068f
...
@@ -17,4 +17,7 @@
...
@@ -17,4 +17,7 @@
@import
'./monitor/dailyTrain.scss'
;
@import
'./monitor/dailyTrain.scss'
;
//器材保养equipmentMaintain
//器材保养equipmentMaintain
@import
'./monitor/equipmentMaintain.scss'
;
@import
'./monitor/equipmentMaintain.scss'
;
//安全巡检 safetyInspection
@import
'./monitor/safetyInspection.scss'
;
src/styles/view/monitor/safetyInspection.scss
0 → 100644
View file @
5d30068f
.safetyInspection-safety
{
position
:
absolute
;
height
:
100%
;
width
:
100%
;
background-image
:
url('/src/assets/safetyManage/bjt.png')
;
background-repeat
:
no-repeat
;
.safetyInspection-safty-content
{
height
:
100%
;
.safetyInspection-top
{
height
:
2%
;
width
:
100%
;
}
.safetyInspection-bottom
{
height
:
93%
;
width
:
100%
;
position
:
relative
;
.safetyInspection-bottom-left
{
height
:
98%
;
width
:
94%
;
position
:
absolute
;
left
:
2
.6%
;
border
:
2px
solid
rgba
(
0
,
185
,
255
,
0
.3
);
.safetyInspection-bottom-left-content
{
height
:
100%
;
.one-div
{
height
:
9%
;
// border:2px solid blue;
width
:
100%
;
display
:
flex
;
background
:
#222b51
!
important
;
.search-one
{
height
:
100%
;
width
:
30%
;
position
:
relative
;
text-align
:
center
;
/* vertical-align: middle; */
top
:
29%
;
left
:
41%
;
.search-one-input
{
width
:
59%
;
.ant-input-affix-wrapper
.ant-input-suffix
{
position
:
absolute
;
padding-right
:
24px
;
top
:
50%
;
transform
:
translateY
(
-50%
);
line-height
:
0
;
color
:
rgba
(
0
,
0
,
0
,
0
.65
);
}
.ant-input-affix-wrapper
{
padding
:
0
;
margin
:
0
;
font-family
:
"Helvetica Neue For Number"
,
-
apple-system
,
BlinkMacSystemFont
,
"Segoe UI"
,
Roboto
,
"PingFang SC"
,
"Hiragino Sans GB"
,
"Microsoft YaHei"
,
"Helvetica Neue"
,
Helvetica
,
Arial
,
sans-serif
;
font-size
:
12px
;
font-variant
:
tabular-nums
;
line-height
:
1
.5
;
color
:
rgba
(
0
,
0
,
0
,
0
.65
);
list-style
:
none
;
box-sizing
:
border-box
;
position
:
relative
;
display
:
inline-block
;
width
:
50
;
padding-left
:
24px
;
padding-right
:
24px
;
}
.ant-input-search
{
.anticon-search
{
&
:
:
before
{
position
:
relative
;
display
:
inline-block
;
background
:
url('/src/assets/safetyManage/sousuo.png')
no-repeat
;
width
:
20px
;
height
:
20px
;
background-size
:
100%
100%
;
top
:
0px
;
content
:
''
!
important
;
}
}
}
.ant-input
{
// width: 10.7rem;
height
:
30px
;
// position: relative;
font-size
:
10px
;
font-family
:
Microsoft
YaHei
;
font-weight
:bold
;
// line-height:50px;
color
:rgba
(
225
,
231
,
232
,
1
)
;
-webkit-text-stroke
:
1
rgba
(
0
,
0
,
0
,
0
.00
);
text-stroke
:
1
rgba
(
0
,
0
,
0
,
0
.00
);
opacity
:
1
;
background
:
rgba
(
0
,
185
,
255
,
0
.3
)
!
important
;
border-radius
:
17px
;
left
:
34%
;
.anticon
:before
{
margin-top
:
1px
;
}
border-color
:rgba
(
0
,
185
,
255
,
0
.3
)
}
}
}
}
.two-div
{
height
:
91%
;
// border:2px solid green;
}
}
}
}
}
}
\ No newline at end of file
src/view/monitor/safetyInspection/SafetyInspectionLeft.js
0 → 100644
View file @
5d30068f
import
React
,
{
Component
}
from
'react'
;
import
ReactEcharts
from
'amos-viz/lib/echarts'
;
import
{
Table
}
from
'amos-antd'
;
import
AmosGridTable
from
'./../safetyManage/AmosGridTable'
;
import
{
Input
,
Button
}
from
'amos-antd'
;
import
{
DatePicker
}
from
'amos-antd'
;
import
moment
from
'moment'
;
import
dt2react
from
'dt2react'
;
const
dateFormatList
=
[
'DD/MM/YYYY'
,
'DD/MM/YY'
];
const
{
RangePicker
}
=
DatePicker
;
const
dateFormat
=
'YYYY/MM/DD'
;
const
monthFormat
=
'YYYY/MM'
;
import
{
Select
}
from
'amos-framework'
;
const
Option
=
Select
.
Option
;
const
Search
=
Input
.
Search
;
const
columns
=
[
{
title
:
'序号'
,
dataIndex
:
'key'
,
width
:
'10%'
,
align
:
'center'
,
// 设置文本居中的属性
render
:
val
=>
<
span
style
=
{{
color
:
"white"
}}
>
{
val
}
<
/span>
,
},
{
title
:
'换流站名称'
,
width
:
'20%'
,
dataIndex
:
'name'
,
render
:
val
=>
<
span
style
=
{{
color
:
"yellow"
}}
>
{
val
}
<
/span>
,
},
{
title
:
'日巡检计划'
,
width
:
'15%'
,
dataIndex
:
'rxjjh'
,
render
:
val
=>
<
span
style
=
{{
color
:
"white"
}}
>
{
val
}
<
/span>
,
},
{
title
:
'月巡检计划'
,
width
:
'15%'
,
dataIndex
:
'yxjjh'
,
render
:
val
=>
<
span
style
=
{{
color
:
"white"
}}
>
{
val
}
<
/span>
,
},
{
title
:
'季度巡检计划'
,
width
:
'15%'
,
dataIndex
:
'jdxjjh'
,
render
:
val
=>
<
span
style
=
{{
color
:
"white"
}}
>
{
val
}
<
/span>
,
},
{
title
:
'发现隐患数'
,
width
:
'10%'
,
dataIndex
:
'fxyhs'
,
render
:
val
=>
<
span
style
=
{{
color
:
"white"
}}
>
{
val
}
<
/span>
,
},
{
title
:
'处理隐患数'
,
width
:
'15%'
,
dataIndex
:
'clyhs'
,
render
:
val
=>
<
span
style
=
{{
color
:
"white"
}}
>
{
val
}
<
/span>
,
}
];
const
data
=
[
{
key
:
'1'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'2'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'3'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'4'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'5'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'6'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'7'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'8'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'9'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'10'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'11'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'12'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'13'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'14'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'15'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'16'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'17'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'18'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'19'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'20'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'21'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'22'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'23'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'225'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'25'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'26'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'27'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'28'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
},
{
key
:
'29'
,
name
:
'复龙换流站'
,
rxjjh
:
170
,
yxjjh
:
100
,
jdxjjh
:
270
,
fxyhs
:
3
,
clyhs
:
7
,
}
];
const
selectdata
=
[
{
id
:
0
,
name
:
'消防理论知识培训'
},
{
id
:
1
,
name
:
'消防技能培训'
},
{
id
:
3
,
name
:
'设备器材维护管理'
},
{
id
:
4
,
name
:
'火灾隐患管理'
},
{
id
:
5
,
name
:
'用火用电管理'
}
];
//偏移
const
offsetHeight
=
110
;
const
defaultHeight
=
450
;
/**
* 安全巡检
*/
class
SafetyInspectionLeft
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
pageConfig
=
{
current
:
1
,
pageSize
:
14
};
this
.
state
=
{
data
:
[],
loading
:
false
,
equimentId
:
null
,
pagination
:
true
,
isChecked
:
false
,
selectedRows
:
[],
selectedRowKeys
:
[],
dataList
:
[],
newDataList
:[],
totalCount
:
0
,
searchParam
:
''
,
fname
:
''
,
current
:
1
,
pageSize
:
10
,
total
:
0
,
tableHeight
:
450
};
}
componentDidMount
()
{
const
{
pagination
}
=
this
.
state
;
debugger
var
box1
=
document
.
getElementById
(
"safetyInspection-bottom-left"
);
var
box2
=
document
.
getElementById
(
"one-div"
);
if
(
box1
&&
box2
){
//此处在加一层判断,更加严密,如果box存在的情况下获取
console
.
log
(
box1
.
offsetHeight
);
console
.
log
(
box2
.
offsetHeight
);
this
.
setState
({
tableHeight
:(
box1
.
offsetHeight
-
box2
.
offsetHeight
)
})
}
}
onChange
=
(
value
,
item
)
=>
{
debugger
console
.
log
(
value
,
item
);
}
onTimeChange
=
(
value
,
dateString
)
=>
{
console
.
log
(
'Selected Time: '
,
value
);
console
.
log
(
'Formatted Selected Time: '
,
dateString
);
}
onOk
=
(
value
)
=>
{
console
.
log
(
'onOk: '
,
value
);
}
onChangeSelect
=
(
value
,
item
)
=>
{
console
.
log
(
value
,
item
);
}
reload
=
r
=>
{
this
.
setState
(
{
reload
:
()
=>
{
r
();
this
.
setState
({
selectedRows
:
[],
selectedRowKeys
:
[]
});
}
},
r
()
);
};
getAcitonData
=
()
=>
{
this
.
setState
({
data
:
data
})
}
/**
* 分页设置参数
*/
setPageConfig
=
({
pageSize
,
current
})
=>
{
if
(
pageSize
!==
undefined
)
{
this
.
pageConfig
.
pageSize
=
pageSize
;
}
if
(
current
!==
undefined
)
{
this
.
pageConfig
.
pageNumber
=
current
;
}
};
/**
* 获取表格所选则的行数据
*/
getSelectedRows
=
(
selectedRows
,
selectedRowKeys
)
=>
{
this
.
setState
({
selectedRows
,
selectedRowKeys
});
let
{
riskSourceId
,
equipmentId
,
callBack
}
=
this
.
props
;
// callBack(selectedRowKeys,riskSourceId,equipmentId);
};
searchData
=
()
=>
{
let
name
=
this
.
state
.
fname
;
alert
(
name
)
}
onChange
=
(
e
,
value
)
=>
{
this
.
setState
({
fname
:
value
});
}
getPanelHeight
=
()
=>
{
//计算表格高度
var
box1
=
document
.
getElementById
(
"safetyInspection-bottom-left"
);
if
(
box1
){
//此处在加一层判断,更加严密,如果box存在的情况下获取
return
box1
.
offsetHeight
*
0.91
}
};
SearchChange
=
(
value
)
=>
{
alert
(
value
)
}
rowClassName
=
(
record
,
index
)
=>
{
let
className
=
index
%
2
?
'back-01'
:
'back-02'
;
return
className
}
render
()
{
let
defaultPageConfig
=
this
.
pageConfig
;
const
{
current
,
pageSize
,
total
}
=
this
.
state
;
let
{
pagination
,
isChecked
,
fname
,
data
,
totalCount
,
selectedRowKeys
}
=
this
.
state
;
return
(
<
div
className
=
"safetyInspection-bottom-left"
id
=
"safetyInspection-bottom-left"
>
<
div
className
=
"safetyInspection-bottom-left-content"
>
<
div
className
=
"one-div"
id
=
"one-div"
>
<
div
className
=
"search-one"
>
{
/* <div className="search-one-button" onClick={this.searchData} /> */
}
<
div
className
=
"search-one-input"
>
<
Search
placeholder
=
"搜索"
onSearch
=
{
this
.
SearchChange
}
/
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"two-div"
>
<
AmosGridTable
columns
=
{
columns
}
dataList
=
{
data
}
isPageable
=
{
pagination
}
totals
=
{
totalCount
}
callBack
=
{
this
.
reload
}
selectedRowKeys
=
{
selectedRowKeys
}
getSelectedRows
=
{
this
.
getSelectedRows
}
getTableDataAction
=
{
this
.
getAcitonData
}
isChecked
=
{
isChecked
}
setPageConfig
=
{
this
.
setPageConfig
}
defaultPageConfig
=
{
defaultPageConfig
}
getPanelHeight
=
{
this
.
getPanelHeight
}
rowClassName
=
{
this
.
rowClassName
}
/
>
<
/div
>
<
/div
>
<
/div
>
);
}
}
SafetyInspectionLeft
.
propTypes
=
{
};
export
default
SafetyInspectionLeft
;
src/view/monitor/safetyInspection/index.js
0 → 100644
View file @
5d30068f
import
React
,
{
Component
}
from
'react'
;
import
SafetyInspectionLeft
from
'./SafetyInspectionLeft'
;
/**
* 安全巡检模块
*/
export
default
class
SafetyInspection
extends
Component
{
render
()
{
return
(
<
div
className
=
"safetyInspection-safety"
>
<
div
className
=
"safetyInspection-safty-content"
>
<
div
className
=
"safetyInspection-top"
><
/div
>
<
div
className
=
"safetyInspection-bottom"
>
<
SafetyInspectionLeft
/>
<
/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