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
3b930af9
Commit
3b930af9
authored
Aug 18, 2020
by
zhengjiawei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消防整改
parent
240973b9
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
1807 additions
and
6 deletions
+1807
-6
amos.config.js
amos.config.js
+1
-1
urlConsts.js
src/consts/urlConsts.js
+11
-1
asyncView.js
src/routes/asyncView.js
+4
-1
view.js
src/routes/view.js
+3
-1
fireRectificationService.js
src/services/fireRectificationService.js
+21
-0
ContentModal.scss
src/styles/view/biz/fireRectification/ContentModal.scss
+14
-0
commonCard.scss
src/styles/view/biz/fireRectification/commonCard.scss
+64
-0
detailContent.scss
src/styles/view/biz/fireRectification/detailContent.scss
+120
-0
fireRectification.scss
src/styles/view/biz/fireRectification/fireRectification.scss
+427
-0
index.scss
src/styles/view/biz/index.scss
+5
-2
request.js
src/utils/request.js
+30
-0
CommonCard.js
src/view/bizview/fireRectification/commonCard/CommonCard.js
+39
-0
index.js
src/view/bizview/fireRectification/commonContainer/index.js
+24
-0
ContentModal.js
...ew/bizview/fireRectification/contentModal/ContentModal.js
+194
-0
index.js
src/view/bizview/fireRectification/detailContent/index.js
+57
-0
index.js
src/view/bizview/fireRectification/index.js
+793
-0
No files found.
amos.config.js
View file @
3b930af9
...
...
@@ -7,7 +7,7 @@
Amos
.
config
=
{
// 普通http
httpURI
:
{
baseURI
:
'http://1
72.16.10.98
:10005/'
,
baseURI
:
'http://1
27.0.0.1
:10005/'
,
//设计器数据绑定
// dataBindUrl: 'http://172.16.10.91:8083/api/visual/common/dataBind'
},
...
...
src/consts/urlConsts.js
View file @
3b930af9
...
...
@@ -273,7 +273,17 @@ export const ModuleEditUrl = {
getPointTypeUrl
:
completePrefix
(
baseURI
,
'api/view3d/point/type'
),
getPointListUrl
:
completePrefix
(
baseURI
,
'api/view3d/init3dViewNode'
),
//获取初始三维点 type=impEquipment&riskSourceId=1
savePointListUrl
:
completePrefix
(
baseURI
,
'api/view3d/point/bind'
),
//批量保存点绑定关系
};
}
/**
* 消防整改
*/
export
const
FireRectificationUrl
=
{
queryFiresAndCountUrl
:
completePrefix
(
baseURI
,
'api/fireRectification/list?nameLike={nameLike}&sDate={sDate}&eDate={eDate}&states={states}&pageNum={pageNum}&pageSize={pageSize}'
),
getOneByidUrl
:
completePrefix
(
baseURI
,
'api/fireRectification/getMoreData?billNo={billNo}'
),
downLoadFilesURL
:
completePrefix
(
baseURI
,
'api/fireRectification/downLoad'
),
fileUploadURL
:
completePrefix
(
baseURI
,
'systemctl/v1/filestorage/batch'
),
updateURL
:
completePrefix
(
baseURI
,
'api/fireRectification/update'
)
};
export
const
securityKey
=
'qianyue(xian),fsc,xunjianpassword'
;
src/routes/asyncView.js
View file @
3b930af9
...
...
@@ -64,6 +64,8 @@ const AsyncShareTextPlan = props => <AsyncLoader load={import('./../view/planMgm
const
AsyncPublishApp
=
props
=>
<
AsyncLoader
load
=
{
import
(
'amos-iot-3dgraph/lib/view/pubview'
)}
componentProps
=
{
props
}
/>
;
const
AsyncModelEdit
=
props
=>
<
AsyncLoader
load
=
{
import
(
'amos-iot-3dgraph/lib/view/modelMgmt/edit/ModelEdit'
)}
componentProps
=
{
props
}
/>
;
const
AsyncUserModel
=
props
=>
<
AsyncLoader
load
=
{
import
(
'../view/bizview/user'
)}
componentProps
=
{
props
}
/>
;
const
AsyncFireRectification
=
props
=>
<
AsyncLoader
load
=
{
import
(
'../view/bizview/fireRectification'
)}
componentProps
=
{
props
}
/>
;
const
Routes
=
{
...
...
@@ -114,7 +116,8 @@ const Routes = {
vizlib
:
AsyncCusVizLib
,
modelManage
:
AsyncGraph3DModel
,
leaderStruct
:
AsyncLeaderStruct
,
userModel
:
AsyncUserModel
userModel
:
AsyncUserModel
,
fireRectification
:
AsyncFireRectification
};
const
pageCompontent
=
key
=>
{
...
...
src/routes/view.js
View file @
3b930af9
...
...
@@ -56,6 +56,7 @@ import PublishView from './../view/planMgmt/view';
import
PanoramicMonitor
from
'./../view/panoramicMonitor'
;
import
LeaderStruct
from
'./../view/planMgmt/view/leaderStruct'
;
import
UserModel
from
'../view/bizview/user'
;
import
FireRectification
from
'../view/bizview/fireRectification'
;
const
Routes
=
{
// 添加 rules 路由
...
...
@@ -104,7 +105,8 @@ const Routes = {
planDrill
:
PublishView
,
modelManage
:
Graph3DModel
,
leaderStruct
:
LeaderStruct
,
userModel
:
UserModel
userModel
:
UserModel
,
fireRectification
:
FireRectification
};
const
pageCompontent
=
key
=>
{
...
...
src/services/fireRectificationService.js
0 → 100644
View file @
3b930af9
import
formatUrl
from
'amos-processor/lib/utils/urlFormat'
;
import
{
commonGet
,
commonPost
,
commonPut
,
commonDelete
,
downLoadZIP
}
from
'./../utils/request'
;
import
{
FireRectificationUrl
}
from
'./../consts/urlConsts'
;
export
const
fireListAction
=
(
nameLike
,
sDate
,
eDate
,
states
,
pageNum
,
pageSize
)
=>
{
return
commonGet
(
formatUrl
(
FireRectificationUrl
.
queryFiresAndCountUrl
,{
nameLike
,
sDate
,
eDate
,
states
,
pageNum
,
pageSize
}));
};
export
const
oneMoreDataAction
=
(
billNo
)
=>
{
return
commonGet
(
formatUrl
(
FireRectificationUrl
.
getOneByidUrl
,{
billNo
}));
};
export
const
downLoadAction
=
(
path
,
Name
)
=>
{
return
downLoadZIP
({
url
:
FireRectificationUrl
.
downLoadFilesURL
,
data
:
[
path
],
fileName
:
Name
});
};
export
const
updateAction
=
(
data
)
=>
{
return
commonPost
(
FireRectificationUrl
.
updateURL
,
data
);
};
src/styles/view/biz/fireRectification/ContentModal.scss
0 → 100644
View file @
3b930af9
@function
vw
(
$px
)
{
@return
(
$px
/
1920
)
*
100vw
;
}
@function
vh
(
$px
)
{
@return
(
$px
/
1080
)
*
100vh
;
}
.conten-modal
{
.safety-data
{
color
:
#4c4b4b
;
}
}
src/styles/view/biz/fireRectification/commonCard.scss
0 → 100644
View file @
3b930af9
.common-card-emca
{
width
:
95%
;
height
:
95%
;
.card-title
{
display
:
flex
;
.title-contain
{
width
:
188px
;
text-align
:
center
;
background
:
#f3f3f3
;
.title-bg
{
background-size
:
cover
;
height
:
31px
;
width
:
188px
;
line-height
:
31px
;
color
:
rgba
(
255
,
255
,
255
,
1
);
cursor
:
pointer
;
border
:
1px
solid
#252525
4d
;
border-right
:
0
;
border-top
:
0
;
border-bottom
:
1px
solid
#252525
4d
;
.title-shape
{
background-color
:
transparent
;
border-right
:
1px
solid
#252525
4d
;
border-top
:
1px
solid
#252525
4d
;
height
:
31px
;
.title-text
{
font-size
:
13px
;
color
:
#4c4b4b
;
}
}
}
}
}
.card-emca-content
{
margin-top
:
-1px
;
height
:
100%
;
border
:
1px
solid
#252525
4d
;
.card-contain
{
position
:
relative
;
height
:
100%
;
.card-corner
{
position
:
absolute
;
right
:
0
;
bottom
:
0
;
width
:
12px
;
height
:
12px
;
border-right
:
1px
solid
#252525
4d
;
border-bottom
:
1px
solid
#252525
4d
;
}
}
}
}
.emca-center-title
{
display
:
flex
;
justify-content
:
center
;
}
src/styles/view/biz/fireRectification/detailContent.scss
0 → 100644
View file @
3b930af9
@function
vw
(
$px
)
{
@return
(
$px
/
1920
)
*
100vw
;
}
@function
vh
(
$px
)
{
@return
(
$px
/
1080
)
*
100vh
;
}
.safe-detail
{
position
:
relative
;
top
:
-10px
;
right
:
0
;
bottom
:
0
;
left
:
0
;
padding-bottom
:
vh
(
20
);
overflow
:
auto
;
overflow-x
:
hidden
;
color
:
#4c4b4b
;
background-size
:
cover
;
outline
:
0
;
-webkit-overflow-scrolling
:
touch
;
filter
:
alpha
(
opacity
=
60
);
.fire-resource-truck-detail-button
{
.go-back
{
float
:
left
;
height
:
2
.5rem
;
margin-top
:
10px
;
background
:
white
;
border
:
1px
solid
#ddddde
;
opacity
:
1
;
}
.amos-btn-transparent
:hover:enabled
{
color
:
inherit
;
background-color
:
transparent
;
opacity
:
0
.85
;
}
.fire-resource-commit-button
{
float
:
right
;
height
:
2
.5rem
;
margin-top
:
10px
;
background
:
transparent
;
border
:
1px
solid
#ddddde
;
opacity
:
1
;
i
{
color
:
#345fa6
;
}
}
}
.detail-title
{
display
:
flex
;
width
:
100vw
;
height
:
vh
(
42
);
margin-top
:
vh
(
11
);
justify-content
:
space-between
;
.title-text
{
width
:
vw
(
257
);
height
:
vh
(
42
);
margin-left
:
vw
(
23
);
font-size
:
vh
(
20
);
text-align
:
center
;
transform
:
skewX
(
-20deg
);
.title-border
{
width
:
vw
(
180
);
height
:
vh
(
42
);
margin
:
0
auto
;
line-height
:
vh
(
42
);
border-bottom
:
2px
solid
#6a696e
;
transform
:
skewX
(
20deg
);
}
}
.states-Icon
div
{
float
:
left
;
margin-top
:
vw
(
7
);
}
.states-Icon
{
margin-left
:
vw
(
375
);
.states-text
{
margin-left
:
vw
(
15
);
}
.color-box
{
width
:
vw
(
15
);
height
:
vh
(
18
);
margin-top
:
vw
(
12
);
border-radius
:
25%
;
}
}
.detail-option
{
display
:
flex
;
width
:
vw
(
250
);
height
:
vh
(
42
);
font-size
:
0
.2rem
;
line-height
:
vh
(
42
);
text-align
:
center
;
justify-content
:
space-between
;
align-items
:
center
;
.detail-item
{
height
:
100%
;
padding
:
2px
;
cursor
:
pointer
;
}
.colse
{
margin-left
:
vw
(
452
);
}
}
}
}
src/styles/view/biz/fireRectification/fireRectification.scss
0 → 100644
View file @
3b930af9
@function
vw
(
$px
)
{
@return
(
$px
/
1920
)
*
100vw
;
}
@function
vh
(
$px
)
{
@return
(
$px
/
1080
)
*
100vh
;
}
.common-container
{
position
:
relative
;
width
:
100%
;
height
:
100%
;
background
:
none
;
.card-corner
{
position
:
absolute
;
right
:
0
;
bottom
:
0
;
width
:
12px
;
height
:
12px
;
}
}
.sefety-bills
{
width
:
vw
(
1860
);
height
:
vh
(
977
);
margin
:
vh
(
19
)
auto
;
overflow
:
auto
;
font-size
:
0
.2rem
;
.conten-modal
{
.bill-card
{
max-height
:
600px
;
overflow
:
auto
;
}
}
.search-bgc
{
height
:
vh
(
89
);
font-size
:
0
.2rem
;
color
:
#4c4b4b
;
background
:
#f3f3f3
;
.top-search
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
padding-top
:
vh
(
25
);
.manage-option
{
display
:
flex
;
width
:
vw
(
400
);
margin-left
:
vw
(
80
);
justify-content
:
space-between
;
line-height
:
vw
(
34
);
div
{
cursor
:
pointer
;
img
{
width
:
vw
(
34
);
height
:
auto
;
}
}
}
.finish-date
{
margin-left
:
vw
(
40
);
.ant-select-selection
{
width
:
vw
(
120
);
}
.ant-calendar-picker
{
width
:
vw
(
128
);
.
ant-calendar-picker-icon
:
:
after
{
color
:
rgb
(
35
,
36
,
36
);
}
}
}
.ant-select-selection
{
font-size
:
0
.16rem
;
color
:
#4c4b4b
;
background-color
:
#e6e2e2
;
border
:
0
;
border-radius
:
16px
;
outline
:
0
;
box-shadow
:
none
;
.
ant-select-arrow
:
:
before
{
color
:
#232424
;
}
.ant-select-selection
:focus
,
.ant-select-selection
:active
{
outline
:
0
;
box-shadow
:
none
;
}
}
.ant-input-search
{
width
:
vw
(
290
);
margin
:
0
vw
(
20
);
.
anticon-search
:
:
before
{
color
:
rgb
(
13
,
13
,
14
);
}
}
.ant-input
{
font-size
:
0
.16rem
;
line-height
:
16px
;
color
:
#5a5959
;
background-color
:
#e6e2e2
;
border
:
0
;
border-radius
:
16px
;
}
.ant-input
:focus
{
outline
:
0
;
box-shadow
:
none
;
}
.
ant-input
:
:-
webkit-input-placeholder
{
color
:
#777575
;
}
.
ant-input
:
-
moz-placeholder
{
color
:
#777575
;
}
.
ant-input
:
:-
moz-placeholder
{
color
:
#777575
;
}
.
ant-input
:
:-
ms-input-placeholder
{
color
:
#777575
;
}
}
}
.ant-pagination
{
float
:
right
;
}
.safety-table
{
max-height
:
450px
;
overflow
:
auto
;
.ant-table-header
{
position
:
relative
;
top
:
55px
;
z-index
:
5
;
height
:
8px
;
background-color
:
#0e0808
0a
;
}
.ant-table-thead
{
tr
{
height
:
vh
(
80
);
th
{
padding
:
vh
(
9
)
vw
(
10
);
font-family
:
'Microsoft YaHei'
;
font-weight
:
400
;
color
:
rgba
(
0
,
0
,
0
,
0
.85
);
text-align
:
center
;
background
:
#f3f3f3
;
opacity
:
1
;
span
{
font-size
:
vw
(
15
);
}
.ant-checkbox-input
{
border
:
solid
1px
#5ffffd
;
}
}
}
}
.ant-table-tbody
{
tr
:nth-of-type
(
2n-1
)
{
background-color
:
#f3f3f3
;
}
tr
:nth-of-type
(
2n
)
{
background-color
:
#f3f3f3
;
}
.ant-table-row
:hover
>
td
{
background-color
:
#f3f3f3
;
}
}
.ant-table-tbody
>
tr
:first-child
{
}
.ant-table-tbody
>
tr
>
td
{
height
:
vh
(
53
);
padding
:
vh
(
10
)
vw
(
12
);
font-family
:
'Microsoft YaHei'
;
font-size
:
vw
(
13
);
font-weight
:
400
;
color
:
#4c4b4b
;
text-align
:
center
;
}
.ant-checkbox-inner
{
background
:
rgba
(
0
,
0
,
0
,
0
.1
);
}
}
.detail-card
{
width
:
vw
(
1104
);
padding-top
:
vh
(
30
);
margin
:
0
auto
;
.safety-detail
{
display
:
flex
;
padding-top
:
vh
(
40
);
margin
:
0
vw
(
60
);
justify-content
:
space-between
;
font-size
:
0
.2rem
;
flex-wrap
:
wrap
;
.safety-info
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
padding-bottom
:
vw
(
16
);
.safety-name
{
width
:
vw
(
120
);
font-weight
:
bold
;
}
.safety-data
{
color
:
#4c4b4b
;
}
.safety-data
{
width
:
vw
(
264
);
height
:
vh
(
47
);
padding-left
:
vw
(
30
);
margin-left
:
vw
(
43
);
line-height
:
vh
(
47
);
color
:
#4c4b4b
;
box-shadow
:
0
1px
6px
rgba
(
0
,
0
,
0
,
0
.16
);
}
}
}
.table-style
{
padding
:
vh
(
24
)
vw
(
60
);
.ant-table-thead
>
tr
>
th
{
font-size
:
0
.2rem
;
font-weight
:
bold
;
}
.ant-table-tbody
>
tr
>
td
{
font-size
:
0
.2rem
;
color
:
#4c4b4b
;
}
}
.info-style
{
display
:
flex
;
padding
:
vh
(
37
)
vw
(
60
);
font-size
:
0
.2rem
;
font-weight
:
bold
;
.info-left
{
flex
:
1
;
}
.info-right
{
flex
:
4
;
width
:
vw
(
739
);
height
:
vh
(
299
);
padding
:
vh
(
11
)
vw
(
30
);
color
:
#4c4b4b
;
border
:
solid
1px
#252525
4d
;
box-shadow
:
0
3px
6px
rgba
(
0
,
0
,
0
,
0
.16
);
.ant-input
:focus
{
outline
:
0
;
box-shadow
:
none
;
}
.
ant-input
:
:-
webkit-input-placeholder
{
color
:
#777575
;
}
.
ant-input
:
-
moz-placeholder
{
color
:
#777575
;
}
.
ant-input
:
:-
moz-placeholder
{
color
:
#777575
;
}
.
ant-input
:
:-
ms-input-placeholder
{
color
:
#777575
;
}
}
}
}
.ant-table-row
a
{
color
:
#49a9ee
;
cursor
:
pointer
;
}
.table-style
thead
>
tr
>
th
{
border-bottom
:
solid
1px
#252525
4d
;
color
:
#4c4b4b
;
text-align
:
left
;
background
:
rgba
(
82
,
237
,
242
,
0
.05
);
}
.info-right
textarea
{
width
:
vw
(
800
);
height
:
vh
(
500
);
color
:
#4c4b4b
;
background-color
:
rgba
(
82
,
237
,
242
,
0
.05
);
border
:
0
;
}
.ant-table-placeholder
{
color
:
#4c4b4b
;
background
:
rgba
(
82
,
237
,
242
,
0
.05
);
}
.states-Icon
div
{
float
:
left
;
width
:
vw
(
70
);
}
.states-Icon
{
.color-box
{
width
:
vw
(
15
);
height
:
vh
(
18
);
margin
:
vw
(
3
)
vh
(
3
)
0
0
;
border-radius
:
25%
;
}
}
}
.resultbackmodel
{
.amos-modal-container
{
width
:
vw
(
530
);
height
:
vh
(
260
);
background-color
:
#f5f5f5
;
border
:
2px
solid
#a29797
6b
;
box-shadow
:
0
1px
6px
0
rgba
(
0
,
0
,
0
,
0
.16
);
.amos-modal-ghost-title
{
color
:
#4c4b4b
;
}
.amos-modal-ghost-content
{
color
:
#4c4b4b
;
}
.amos-modal-ghost-btns
{
margin-top
:
vh
(
100
);
}
.amos-modal-ghost-btns
a
:first-child
{
color
:
#49a9ee
;
cursor
:
pointer
;
}
.amos-modal-ghost-btns
a
{
position
:
relative
;
bottom
:
15px
;
margin
:
0
10px
;
color
:
#4c4b4b
;
cursor
:
pointer
;
}
.amos-modal-ghost-btns
.text-one
a
{
position
:
relative
;
bottom
:
50px
;
}
.amos-modal-ghost-content
{
.ant-input
:focus
{
border-color
:
#ddd
;
outline
:
0
;
box-shadow
:
none
;
}
.ant-input
:hover
{
border-color
:
#ddd
;
outline
:
0
;
box-shadow
:
none
;
}
.
ant-input
:
:-
webkit-input-placeholder
{
color
:
#777575
;
}
.
ant-input
:
-
moz-placeholder
{
color
:
#777575
;
}
.
ant-input
:
:-
moz-placeholder
{
color
:
#777575
;
}
.
ant-input
:
:-
ms-input-placeholder
{
color
:
#777575
;
}
}
}
}
src/styles/view/biz/index.scss
View file @
3b930af9
...
...
@@ -14,6 +14,10 @@
@import
'./situation/map.scss'
;
@import
'./differentiate/differentiate.scss'
;
@import
'./alarmVideoMonitor/alarmVideoMonitor.scss'
;
@import
'./fireRectification/fireRectification.scss'
;
@import
'./fireRectification/detailContent.scss'
;
@import
'./fireRectification/ContentModal.scss'
;
@import
'./fireRectification/commonCard.scss'
;
.ant-calendar-picker-container
{
&
.ant-calendar-picker-container-placement-bottomRight
{
...
...
@@ -151,4 +155,4 @@
}
.ant-tabs.ant-tabs-card
>
.ant-tabs-bar
.ant-tabs-nav-container
{
height
:
60px
!
important
;
}
\ No newline at end of file
}
src/utils/request.js
View file @
3b930af9
import
amosRequest
,
{
singleFetch
}
from
'amos-processor/lib/fetch/amosRequest'
;
import
{
utils
,
Store
}
from
'amos-tool'
;
import
{
AmosFetch
}
from
'amos-processor/lib/fetch'
;
import
{
message
}
from
'amos-framework'
;
import
formatUrl
from
'amos-processor/lib/utils/urlFormat'
;
import
SysConsts
from
'amos-processor/lib/config/consts'
;
...
...
@@ -129,5 +130,34 @@ export const getWithCookie = (url) => {
hasCookie
:
true
});
};
export
const
downLoadZIP
=
({
url
,
data
,
fileName
,
method
=
'POST'
})
=>
{
return
AmosFetch
[
method
.
toLocaleLowerCase
()](
url
,
{
params
:
{
headers
:
{
'Accept'
:
'application/json, */*'
,
...
compleHeaders
()
},
...
method
.
toLocaleLowerCase
()
!==
'get'
?
{
body
:
JSON
.
stringify
(
data
||
{})
}
:
{}
}
}
).
then
((
response
)
=>
{
if
(
response
.
ok
)
{
response
.
blob
().
then
((
blob
)
=>
{
const
a
=
window
.
document
.
createElement
(
'a'
);
const
downUrl
=
window
.
URL
.
createObjectURL
(
blob
);
a
.
href
=
downUrl
;
a
.
download
=
fileName
;
a
.
click
();
window
.
URL
.
revokeObjectURL
(
downUrl
);
});
return
{
state
:
1
};
}
else
{
throw
new
Error
(
''
);
}
});
};
export
{
amosRequest
,
singleFetch
,
convertDatalist
,
buildPageable
,
formatUrl
};
src/view/bizview/fireRectification/commonCard/CommonCard.js
0 → 100644
View file @
3b930af9
import
React
,
{
Component
}
from
'react'
;
import
PropTypes
from
'prop-types'
;
class
CommonCard
extends
Component
{
constructor
(
props
)
{
super
(
props
);
}
render
()
{
const
{
title
,
children
,
position
}
=
this
.
props
;
return
(
<
div
className
=
"common-card-emca"
>
<
div
className
=
{
`card-title
${
position
===
'center'
?
'emca-center-title'
:
''
}
`
}
>
<
div
className
=
"title-contain"
>
<
div
className
=
"title-bg"
>
<
div
className
=
"title-shape"
>
<
div
className
=
"title-text"
>
{
title
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"card-emca-content"
>
<
div
className
=
"card-contain"
>
{
children
}
<
div
className
=
"card-corner"
/>
<
/div
>
<
/div
>
<
/div
>
);
}
}
CommonCard
.
propTypes
=
{
title
:
PropTypes
.
string
,
position
:
PropTypes
.
string
,
children
:
PropTypes
.
node
};
export
default
CommonCard
;
src/view/bizview/fireRectification/commonContainer/index.js
0 → 100644
View file @
3b930af9
import
React
,
{
Component
}
from
'react'
;
import
PropTypes
from
'prop-types'
;
class
CommonContainer
extends
Component
{
constructor
(
props
)
{
super
(
props
);
}
render
()
{
return
(
<
div
className
=
"common-container"
>
{
this
.
props
.
children
}
<
div
className
=
"card-corner"
/>
<
/div
>
);
}
}
CommonContainer
.
propTypes
=
{
children
:
PropTypes
.
node
};
export
default
CommonContainer
;
src/view/bizview/fireRectification/contentModal/ContentModal.js
0 → 100644
View file @
3b930af9
import
React
,
{
Component
}
from
'react'
;
import
{
Table
,
Input
}
from
'amos-antd'
;
import
PropTypes
from
'prop-types'
;
import
CommonCard
from
'../commonCard/CommonCard'
;
const
{
TextArea
}
=
Input
;
class
ContentModal
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
form
:
{}
};
}
/**
* 页面修改数据记录
* @param {*} varName
* @param {*} value
*/
handleDataChange
=
(
varName
,
value
)
=>
{
const
{
form
}
=
this
.
state
;
form
[
varName
]
=
value
;
this
.
setState
({
form
},()
=>
this
.
props
.
DataPack
(
this
.
state
.
form
));
}
render
()
{
const
{
states
,
headerData
=
{},
alarmColumns
=
[],
riskColumns
=
[],
dangerColumns
=
[],
alarmInfo
=
[],
riskInfo
=
[],
dangerInfo
=
[]
,
fires
=
{},
backResult
=
''
}
=
this
.
props
;
return
(
<
div
className
=
"bill-card"
>
<
div
className
=
"detail-card"
>
<
CommonCard
title
=
"1.消防安全登记单基本信息"
>
<
div
className
=
"safety-detail"
>
<
div
className
=
"safety-info"
>
<
div
className
=
"safety-name"
>
隐患登记单号
<
/div
>
<
div
className
=
"safety-data"
>
{
headerData
.
billno
}
<
/div
>
<
/div
>
<
div
className
=
"safety-info"
>
<
div
className
=
"safety-name"
>
换流站名称
<
/div
>
<
div
className
=
"safety-data"
>
{
headerData
.
stationName
}
<
/div
>
<
/div
>
<
div
className
=
"safety-info"
>
<
div
className
=
"safety-name"
>
整改下发人员
<
/div
>
<
div
className
=
"safety-data"
>
{
headerData
.
disUser
}
<
/div
>
<
/div
>
<
div
className
=
"safety-info"
>
<
div
className
=
"safety-name"
>
登记时间
<
/div
>
<
div
className
=
"safety-data"
>
{
headerData
.
disDate
}
<
/div
>
<
/div
>
<
div
className
=
"safety-info"
>
<
div
className
=
"safety-name"
>
换流站负责人
<
/div
>
<
div
className
=
"safety-data"
>
{
headerData
.
stationUser
}
<
/div
>
<
/div
>
<
div
className
=
"safety-info"
>
<
div
className
=
"safety-name"
>
联系电话
<
/div
>
<
div
className
=
"safety-data"
>
{
headerData
.
stationUserTel
}
<
/div
>
<
/div
>
<
div
className
=
"safety-info"
>
<
div
className
=
"safety-name"
>
安全负责人
<
/div
>
<
div
className
=
"safety-data"
>
{
headerData
.
safeUser
}
<
/div
>
<
/div
>
<
div
className
=
"safety-info"
>
<
div
className
=
"safety-name"
>
联系电话
<
/div
>
<
div
className
=
"safety-data"
>
{
headerData
.
safeUserTel
}
<
/div
>
<
/div
>
<
div
className
=
"safety-info"
>
<
div
className
=
"safety-name"
>
要求完成时间
<
/div
>
<
div
className
=
"safety-data"
>
{
headerData
.
reqDate
}
<
/div
>
<
/div
>
<
div
className
=
"safety-info"
>
<
div
className
=
"safety-name"
>
实际完成时间
<
/div
>
<
div
className
=
"safety-data"
>
{
headerData
.
finishDate
}
<
/div
>
<
/div
>
<
/div
>
<
/CommonCard
>
<
/div
>
<
div
className
=
"detail-card"
>
<
CommonCard
title
=
"2.告警信息"
>
<
div
className
=
"table-style"
>
<
Table
pagination
=
{
false
}
columns
=
{
alarmColumns
}
dataSource
=
{
alarmInfo
}
rowKey
=
{
record
=>
record
.
req
}
/
>
<
/div
>
<
/CommonCard
>
<
/div
>
<
div
className
=
"detail-card"
>
<
CommonCard
title
=
"3.风险信息"
>
<
div
className
=
"table-style"
>
<
Table
pagination
=
{
false
}
columns
=
{
riskColumns
}
dataSource
=
{
riskInfo
}
rowKey
=
{
record
=>
record
.
req
}
/
>
<
/div
>
<
/CommonCard
>
<
/div
>
<
div
className
=
"detail-card"
>
<
CommonCard
title
=
"4.隐患信息"
>
<
div
className
=
"table-style"
>
<
Table
pagination
=
{
false
}
columns
=
{
dangerColumns
}
dataSource
=
{
dangerInfo
}
rowKey
=
{
record
=>
record
.
req
}
/
>
<
/div
>
<
/CommonCard
>
<
/div
>
<
div
className
=
"detail-card"
>
<
CommonCard
title
=
"5.消防安全管理"
>
<
div
className
=
"info-style"
>
<
div
className
=
"info-left"
>
消防安全管理
<
/div
>
<
div
className
=
"info-right"
>
按照换流站消防管理要求,需具备消防应急预案
{
fires
.
fire1thr
}
套
,
实际
{
fires
.
fire1rel
}
套,
每年需完成消防安全教育培训
{
fires
.
fire2thr
}
次
,
实际
{
fires
.
fire2rel
}
次,
每年需完成消防日常训练
{
fires
.
fire3thr
}
次
,
实际
{
fires
.
fire3rel
}
次,
每年需完成站内消防器材保养
{
fires
.
fire4thr
}
次
,
实际
{
fires
.
fire4rel
}
次
{
backResult
}
<
/div
>
<
/div
>
<
div
className
=
"info-style"
>
<
div
className
=
"info-left"
>
整改结果
<
/div
>
{
states
===
'2'
&&
<
div
className
=
"info-right"
>
{
headerData
.
refResult
}
<
/div>
}
{
states
===
'1'
&&
<
div
className
=
"info-right"
>
<
TextArea
autosize
=
{{
minRows
:
10
,
maxRows
:
10
}}
placeholder
=
{
headerData
.
refResult
===
null
?
'请输入'
:
headerData
.
refResult
}
defaultValue
=
{
headerData
.
refResult
}
onChange
=
{(
e
)
=>
this
.
handleDataChange
(
'refResult'
,
e
.
target
.
value
)}
/
>
<
/div>
}
<
/div
>
<
/CommonCard
>
<
/div
>
<
div
className
=
"detail-card"
>
<
CommonCard
title
=
"6.治理建议及意见"
>
<
div
className
=
"info-style"
>
<
div
className
=
"info-left"
>
意见及建议
<
/div
>
<
div
className
=
"info-right"
>
{
headerData
.
viewsAndSuggestions
}
<
/div
>
<
/div
>
<
/CommonCard
>
<
/div
>
<
div
className
=
"detail-card"
>
<
CommonCard
title
=
"7.整改人反馈"
>
<
div
className
=
"info-style"
>
<
div
className
=
"info-left"
>
反馈结果
<
/div
>
{
states
===
'2'
&&
<
div
className
=
"info-right"
>
{
headerData
.
backResult
}
<
/div>
}
{
states
===
'1'
&&
<
div
className
=
"info-right"
>
<
TextArea
autosize
=
{{
minRows
:
10
,
maxRows
:
10
}}
placeholder
=
{
headerData
.
backResult
===
null
?
'请输入'
:
headerData
.
backResult
}
defaultValue
=
{
headerData
.
backResult
}
onChange
=
{(
e
)
=>
this
.
handleDataChange
(
'backResult'
,
e
.
target
.
value
)}
/
>
<
/div>
}
<
/div
>
<
/CommonCard
>
<
/div
>
<
/div
>
);
}
}
ContentModal
.
propTypes
=
{
headerData
:
PropTypes
.
object
,
alarmInfo
:
PropTypes
.
array
,
riskInfo
:
PropTypes
.
array
,
dangerInfo
:
PropTypes
.
array
,
station
:
PropTypes
.
object
,
alarmColumns
:
PropTypes
.
array
,
riskColumns
:
PropTypes
.
array
,
dangerColumns
:
PropTypes
.
array
,
fires
:
PropTypes
.
object
,
backResult
:
PropTypes
.
string
,
types
:
PropTypes
.
bool
,
states
:
PropTypes
.
string
,
DataPack
:
PropTypes
.
func
};
export
default
ContentModal
;
src/view/bizview/fireRectification/detailContent/index.js
0 → 100644
View file @
3b930af9
import
React
,
{
Component
}
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
{
Button
}
from
'amos-framework'
;
import
BizIcon
from
'./../../../common/icon/BizIcon'
;
class
DetailContent
extends
Component
{
constructor
(
props
)
{
super
(
props
);
}
save
=
(
e
)
=>
{
this
.
props
.
savePack
(
e
);
}
render
()
{
const
colorStates
=
[
{
color
:
'#ffaa00'
,
name
:
'待下发'
},
{
color
:
'#0088ff'
,
name
:
'未处理'
},
{
color
:
'#00ff11'
,
name
:
'已完成'
},
{
color
:
'#9e9e9e'
,
name
:
'已关闭'
},
{
color
:
''
,
name
:
''
}
];
const
{
detailVisible
,
handleClose
,
children
,
states
}
=
this
.
props
;
return
(
<
div
className
=
"safe-detail"
style
=
{{
display
:
!
detailVisible
?
'none'
:
'block'
}}
>
<
div
className
=
"fire-resource-truck-detail-button"
>
<
Button
className
=
"go-back"
icon
=
{
<
BizIcon
icon
=
"fanhui"
/>
}
transparent
onClick
=
{
handleClose
}
/
>
<
div
className
=
"fire-resource-commit-button"
>
{
<
Button
icon
=
"ok"
onClick
=
{()
=>
this
.
save
()}
transparent
>
提交
<
/Button
>
}
<
/div
>
<
/div
>
<
div
className
=
"detail-title"
>
<
div
className
=
"states-Icon"
>
<
div
className
=
"color-box"
style
=
{{
background
:
colorStates
[
states
].
color
}}
>
<
/div
>
<
div
className
=
"states-text"
>
{
colorStates
[
states
].
name
}
<
/div
>
<
/div
>
<
/div
>
{
children
}
<
/div
>
);
}
}
DetailContent
.
propTypes
=
{
children
:
PropTypes
.
node
,
detailVisible
:
PropTypes
.
bool
,
handleClose
:
PropTypes
.
func
,
savePack
:
PropTypes
.
func
,
states
:
PropTypes
.
string
,
types
:
PropTypes
.
bool
};
export
default
DetailContent
;
src/view/bizview/fireRectification/index.js
0 → 100644
View file @
3b930af9
import
React
,
{
Component
}
from
'react'
;
import
{
Input
,
Select
,
Table
,
DatePicker
,
Pagination
,
Upload
}
from
'amos-antd'
;
import
{
AmosAlert
,
Modal
}
from
'amos-framework'
;
import
_amosTool
from
'amos-tool'
;
import
SysConsts
from
'amos-processor/lib/config/consts'
;
import
CommonContainer
from
'./commonContainer/index'
;
import
DetailContent
from
'./detailContent/index'
;
import
ContentModal
from
'./contentModal/ContentModal'
;
import
{
fireListAction
,
oneMoreDataAction
,
downLoadAction
,
updateAction
}
from
'./../../../services/fireRectificationService'
;
import
{
getBase64
}
from
'./../../../utils/FileUtils'
;
import
{
FireRectificationUrl
}
from
'../../../consts/urlConsts'
;
const
{
TextArea
}
=
Input
;
const
Search
=
Input
.
Search
;
const
Option
=
Select
.
Option
;
const
ghost
=
Modal
.
ghost
;
const
ls
=
_amosTool
.
Store
.
lsTool
;
const
apiKey
=
SysConsts
.
api_key
;
const
token
=
SysConsts
.
token
;
const
url
=
FireRectificationUrl
.
fileUploadURL
;
/**
* FireRectification
* 消防整改
* @class FireRectification
* @extends {Component}
*/
class
FireRectification
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
form
:
{
nameLike
:
''
,
//模糊查询
sDate
:
''
,
//起始日
eDate
:
''
,
//结束日
states
:
'0'
,
//状态
pageNum
:
1
,
pageSize
:
10
}
,
billData
:
[],
//展示页数据
pageCount
:
0
,
//总页数
timestamp
:
''
,
//时间戳
detailVisible
:
false
,
//控制修改页面显示
showMoreData
:
{},
//查看详情页数据
updateFrom
:
{
warnningData
:
[],
//告警修改数据
hiddenData
:
[],
//隐患修改数据
dangerData
:
[]
//风险修改数据
},
dataStates
:
'0'
,
//当前展示数据的状态值
textArea
:
''
,
//记录风险反馈修改数据
warmningFileList
:
[],
//告警上传文件
hiddenFileList
:
[],
//隐患上传文件
index
:
''
,
//记录当前上传文件对应数据的下标
previewImage
:
''
,
//展示图片
previewVisible
:
false
};
}
componentDidMount
()
{
this
.
getBillData
();
}
/**
* 获取数据
* @param {*} e 分页归零参数
*/
getBillData
=
(
e
)
=>
{
if
(
e
===
0
){
const
{
form
}
=
this
.
state
;
form
[
'pageNum'
]
=
1
;
this
.
setState
({
form
},()
=>
console
.
log
(
'---刷新数据---'
));
}
const
{
form
}
=
this
.
state
;
const
nameLike
=
form
.
nameLike
;
const
sDate
=
this
.
dateTypeChange
(
form
.
sDate
);
const
eDate
=
this
.
dateTypeChange
(
form
.
eDate
);
const
states
=
form
.
states
;
const
pageNum
=
form
.
pageNum
;
const
pageSize
=
form
.
pageSize
;
fireListAction
(
nameLike
,
sDate
,
eDate
,
states
,
pageNum
,
pageSize
).
then
(
data
=>
{
form
[
'chosList'
]
=
[];
this
.
setState
({
billData
:
data
.
fireRectificationBos
,
pageCount
:
data
.
countFires
,
timestamp
:
new
Date
()
});
});
}
/**
* 获取yyyy-mm-dd 数据格式
* @param {*} d 日期数据
*/
dateTypeChange
=
(
d
)
=>
{
if
(
d
!==
''
){
const
date
=
new
Date
(
d
);
const
value
=
`
${
date
.
getFullYear
()}
-
${(
date
.
getMonth
()
+
1
)}
-
${
date
.
getDate
()}
`
;
return
value
;
}
return
null
;
}
/**
* 实时更改数据变化并刷新页面
* @param {*} varName 参数名
* @param {*} value 参数值
*/
handlerWhenDataChange
=
(
varName
,
value
)
=>
{
const
{
form
}
=
this
.
state
;
form
[
varName
]
=
value
;
//如修改值不是页面,则传参将页码初始化
if
(
varName
===
'pageNum'
){
this
.
setState
({
form
},()
=>
this
.
getBillData
());
}
else
{
this
.
setState
({
form
},()
=>
this
.
getBillData
(
0
));
}
}
/**
*
* @param {*} value 输入参数
*/
handleSearch
=
(
value
)
=>
{
this
.
handlerWhenDataChange
(
'nameLike'
,
value
);
}
/**
* 关闭查看修改页面
* @param {*} e
*/
handleClose
=
(
e
)
=>
{
const
dataStates
=
this
.
state
.
dataStates
;
if
(
dataStates
===
'1'
){
AmosAlert
.
confirm
(
'提示'
,
'是否关闭当前编辑页面(您所修改的信息将不会保存)?'
,
{
callback
:
(
flag
)
=>
{
if
(
flag
){
this
.
setState
({
detailVisible
:
false
,
updateFrom
:
{}
});
}
}
});
}
else
{
this
.
setState
({
detailVisible
:
false
,
updateFrom
:
{}
});
}
}
/**
* 下载按钮
* @param {*} path 文件路径
*/
downLoad
=
(
path
,
type
)
=>
{
const
name
=
`单据号:
${
this
.
state
.
showMoreData
.
base
.
billno
}
-
${
type
}
相关附件`
;
if
(
path
===
null
){
AmosAlert
.
warning
(
'注意'
,
'该单据无相关附件'
);
}
else
{
downLoadAction
(
path
,
name
);
}
}
/**
* 双击触发事件
* @param {*} record 对应行数据
*/
ShowMore
=
(
record
)
=>
{
this
.
setState
({
dataStates
:
record
.
statuscode
},()
=>
console
.
log
(
'---------------获取单据相关数据----------------'
));
this
.
setState
({
showMoreData
:
{}
});
oneMoreDataAction
(
record
.
billno
).
then
(
data
=>
{
this
.
setState
({
showMoreData
:
data
,
detailVisible
:
true
});
});
}
/**
* 查看反馈结果弹窗
* @param {*} record
*/
popupCustom
=
(
record
,
dataStates
)
=>
{
const
dialog
=
ghost
.
show
({
title
:
dataStates
===
'2'
?
'反馈结果详情查看'
:
''
,
content
:
dataStates
===
'2'
?
record
.
backResult
:
(
<
TextArea
autosize
=
{{
minRows
:
4
,
maxRows
:
4
}}
placeholder
=
{
record
.
backResult
===
null
?
'请输入'
:
record
.
backResult
}
defaultValue
=
{
record
.
backResult
}
onChange
=
{(
e
)
=>
this
.
handleDataChange
(
e
.
target
.
value
)}
/>
)
,
className
:
'resultbackmodel'
,
hiddenOverlayer
:
true
,
overlayerTransitionName
:
false
,
footer
:
(
<
div
>
{
dataStates
===
'1'
&&
<
div
className
=
"text-one"
>
<
a
onClick
=
{()
=>
this
.
dangerDataChange
(
record
,
dialog
)}
>
确定
<
/a
>
<
a
onClick
=
{()
=>
dialog
.
hide
()}
>
关闭
<
/a
>
<
/div>
}
{
dataStates
===
'2'
&&
<
div
>
<
a
onClick
=
{()
=>
dialog
.
hide
()}
>
关闭
<
/a
>
<
/div>
}
<
/div
>
)
});
};
/**
* 记录子页面修改的text数据
* @param {*} text
*/
handleDataChange
=
(
text
)
=>
{
this
.
setState
({
textArea
:
text
},()
=>
console
.
log
(
''
));
}
/**
* 风险反馈
* @param {*} record
* @param {*} dialog
*/
dangerDataChange
=
(
record
,
dialog
)
=>
{
dialog
.
hide
();
const
{
showMoreData
}
=
this
.
state
;
let
data
=
showMoreData
[
'danger'
];
let
a
=
this
.
ishas
(
data
,
record
);
data
[
a
.
index
].
backResult
=
this
.
state
.
textArea
;
showMoreData
[
'danger'
]
=
data
;
this
.
setState
({
showMoreData
},()
=>
console
.
log
(
''
));
const
{
updateFrom
}
=
this
.
state
;
let
updateData
=
updateFrom
[
'dangerData'
];
let
b
=
this
.
ishas
(
updateData
,
record
);
if
(
b
.
has
){
updateData
[
b
.
index
].
backResult
=
this
.
state
.
textArea
;
}
else
{
updateData
.
push
({
req
:
record
.
req
,
backResult
:
record
.
backResult
});
}
updateFrom
[
'dangerData'
]
=
updateData
;
this
.
setState
({
textArea
:
''
});
this
.
setState
({
updateFrom
},()
=>
console
.
log
(
this
.
state
.
updateFrom
));
}
/**
* 获取修改页面的修改数据返回值
* @param {*} e
*/
DataPack
=
(
e
)
=>
{
const
{
updateFrom
}
=
this
.
state
;
updateFrom
[
'backResult'
]
=
e
.
backResult
;
updateFrom
[
'refResult'
]
=
e
.
refResult
;
this
.
setState
({
updateFrom
},()
=>
console
.
log
(
this
.
state
.
updateFrom
));
}
/**
* 判断非空
*/
regularUpdateData
=
()
=>
{
let
result
=
true
;
const
{
warmningFileList
,
hiddenFileList
,
updateFrom
}
=
this
.
state
;
if
(
warmningFileList
.
length
===
0
&&
hiddenFileList
.
length
===
0
&&
updateFrom
.
warnningData
.
length
===
0
&&
updateFrom
.
hiddenData
.
length
===
0
&&
updateFrom
.
dangerData
.
length
===
0
&&
!
updateFrom
.
backResult
&&
!
updateFrom
.
refResult
)
{
result
=
false
;
}
return
result
;
}
/**
* 保存修改信息
* @param {*} e
*/
savePack
=
(
e
)
=>
{
let
canSave
=
true
;
const
{
updateFrom
,
warmningFileList
,
hiddenFileList
}
=
this
.
state
;
updateFrom
.
warnningData
.
map
((
item
,
i
)
=>
{
if
(
item
.
doneResult
===
'1'
)
{
let
list
=
warmningFileList
[
`fileList
${
i
}
`
];
if
(
list
===
undefined
||
list
.
length
===
0
)
{
AmosAlert
.
error
(
'错误'
,
'告警信息已完成状态相关数据,凭证不能为空'
);
canSave
=
false
;
}
}
});
updateFrom
.
dangerData
.
map
((
item
,
i
)
=>
{
if
(
item
.
doneResult
===
'1'
)
{
let
list
=
hiddenFileList
[
`fileList
${
i
}
`
];
if
(
list
===
undefined
||
list
.
length
===
0
)
{
AmosAlert
.
error
(
'错误'
,
'告警信息已完成状态相关数据,凭证不能为空'
);
canSave
=
false
;
}
}
});
let
ref
=
this
.
regularUpdateData
();
if
(
!
ref
)
{
AmosAlert
.
warning
(
'注意'
,
'页面数据未发生变动,无需保存'
);
canSave
=
false
;
}
if
(
canSave
)
{
AmosAlert
.
confirm
(
'提示'
,
'是否保存?'
,
{
callback
:
(
flag
)
=>
{
if
(
flag
){
updateFrom
.
warnningData
.
map
((
item
,
i
)
=>
{
this
.
uploadFiles
(
'warnningData'
,
'warmningFileList'
,
i
);
});
updateFrom
.
hiddenData
.
map
((
item
,
i
)
=>
{
this
.
uploadFiles
(
'hiddenData'
,
'hiddenFileList'
,
i
);
});
updateFrom
[
'billNo'
]
=
this
.
state
.
showMoreData
.
base
.
billno
;
updateAction
(
updateFrom
).
then
(
data
=>
{
if
(
data
.
message
===
'success'
)
{
AmosAlert
[
data
.
message
](
'提示'
,
data
.
result
);
this
.
setState
({
detailVisible
:
false
,
updateFrom
:
{}
},()
=>
this
.
getBillData
(
0
));
}
else
{
AmosAlert
[
data
.
message
](
'提示'
,
data
.
result
);
}
});
}
}
});
}
}
/**
* 上传文件
* @param {*} listData
* @param {*} Lists
* @param {*} index
*/
uploadFiles
=
(
listData
,
Lists
,
index
)
=>
{
let
formData
=
new
FormData
();
const
{
updateFrom
}
=
this
.
state
;
const
fileList
=
this
.
state
[
Lists
];
fileList
[
`fileList
${
index
}
`
].
forEach
(
file
=>
{
formData
.
append
(
'files'
,
file
);
});
fetch
(
url
,
{
method
:
'post'
,
headers
:
{
Accept
:
'application/json;charset=UTF-8'
,
'X-Api-Key'
:
_amosTool
.
Store
.
getCookieByName
(
apiKey
),
'X-Access-Token'
:
ls
.
read
(
token
),
'appKey'
:
'CONVERTER_STATION'
,
'product'
:
'CONVERTER_STATION_WEB'
,
'token'
:
ls
.
read
(
token
)
},
body
:
formData
}).
then
(
Response
=>
{
return
Response
.
json
();
}).
then
(
Response
=>
{
let
a
=
''
;
Object
.
keys
(
Response
.
result
).
map
((
item
,
i
)
=>
{
if
(
i
===
0
){
a
=
item
;
}
else
{
a
=
`
${
a
}
,
${
item
}
`
;
}
});
updateFrom
[
listData
][
index
].
filePath
=
a
;
this
.
setState
({
updateFrom
},()
=>
console
.
log
(
this
.
state
.
updateFrom
));
}).
catch
(
e
=>
{
AmosAlert
.
error
(
'错误'
,
'图片上传失败'
);
});
}
/**
* 处理结果修改监控
* @param {*} record
* @param {*} e
* @param {*} type
*/
selectOnChange
=
(
record
,
e
,
type
)
=>
{
let
data
=
[];
const
{
updateFrom
}
=
this
.
state
;
data
=
updateFrom
[
type
];
let
a
=
this
.
ishas
(
data
,
record
);
if
(
a
.
has
){
data
[
a
.
index
].
doneResult
=
e
;
}
else
{
data
.
push
({
req
:
record
.
req
,
doneResult
:
e
});
}
updateFrom
[
type
]
=
data
;
this
.
setState
({
updateFrom
},()
=>
console
.
log
(
this
.
state
.
updateFrom
));
}
/**
* 判断当前新数据是否存在于已有数据
* @param {*} data
* @param {*} record
*/
ishas
=
(
data
,
record
)
=>
{
let
a
=
{
has
:
false
,
index
:
0
};
data
.
map
((
item
,
i
)
=>
{
if
(
item
.
req
===
record
.
req
)
{
return
a
=
{
has
:
true
,
index
:
i
};
}
});
return
a
;
}
/**
* 记录当前上传文件的对应数据
* @param {*} fileindex
*/
chossFileList
=
fileindex
=>
{
this
.
setState
({
index
:
`fileList
${
fileindex
}
`
});
}
/**
* 阻止上传
* @param {*} file
*/
beforeUploadWarmningFileList
=
(
file
)
=>
{
this
.
warmningChangeData
(
file
);
return
false
;
};
beforeUploadhiddenFileList
=
(
file
)
=>
{
this
.
hiddenFileListChangeData
(
file
);
return
false
;
};
/**
* 存储base64的文件
* @param {*} file
*/
warmningChangeData
=
async
(
file
)
=>
{
file
.
url
=
await
getBase64
(
file
);
let
{
warmningFileList
}
=
this
.
state
;
let
index
=
this
.
state
.
index
;
let
fileList
=
warmningFileList
[
index
];
if
(
fileList
===
undefined
)
{
fileList
=
[];
}
warmningFileList
[
index
]
=
[...
fileList
,
file
];
this
.
setState
({
warmningFileList
},()
=>
console
.
log
(
this
.
state
.
warmningFileList
));
};
hiddenFileListChangeData
=
async
(
file
)
=>
{
file
.
url
=
await
getBase64
(
file
);
let
{
hiddenFileList
}
=
this
.
state
;
let
index
=
this
.
state
.
index
;
let
fileList
=
hiddenFileList
[
index
];
if
(
fileList
===
undefined
)
{
fileList
=
[];
}
hiddenFileList
[
index
]
=
[...
fileList
,
file
];
this
.
setState
({
hiddenFileList
},()
=>
console
.
log
(
this
.
state
.
hiddenFileList
));
};
/**
* 删除已存文件
* @param {*} file
*/
warmningFileListRemove
=
file
=>
{
let
{
warmningFileList
}
=
this
.
state
;
let
fileindex
=
this
.
state
.
index
;
let
fileList
=
warmningFileList
[
fileindex
];
let
index
=
fileList
.
indexOf
(
file
);
let
newFileList
=
fileList
.
slice
();
newFileList
.
splice
(
index
,
1
);
warmningFileList
[
fileindex
]
=
newFileList
;
this
.
setState
({
warmningFileList
});
};
hiddenFileListRemove
=
file
=>
{
let
{
hiddenFileList
}
=
this
.
state
;
let
fileindex
=
this
.
state
.
index
;
let
fileList
=
hiddenFileList
[
fileindex
];
let
index
=
fileList
.
indexOf
(
file
);
let
newFileList
=
fileList
.
slice
();
newFileList
.
splice
(
index
,
1
);
hiddenFileList
[
fileindex
]
=
newFileList
;
this
.
setState
({
hiddenFileList
});
};
/**
* 打开已存文件
* @param {*} file
*/
handlePreview
=
file
=>
{
this
.
setState
({
previewImage
:
file
.
url
,
previewVisible
:
true
});
};
/**
* 关闭已存文件
*/
handleCancel
=
()
=>
this
.
setState
({
previewVisible
:
false
});
render
()
{
const
columns
=
[
{
title
:
'序号'
,
render
:
(
text
,
record
,
index
)
=>
`
${
index
+
1
}
`
},
{
title
:
'登记单号'
,
dataIndex
:
'billno'
,
key
:
'billno'
},
{
title
:
'换流站'
,
dataIndex
:
'stationName'
,
key
:
'stationName'
},
{
title
:
'需处理告警'
,
dataIndex
:
'warnning'
,
key
:
'warnning'
},
{
title
:
'需关注风险'
,
dataIndex
:
'danger'
,
key
:
'danger'
},
{
title
:
'需处理隐患'
,
dataIndex
:
'hiddenTrouble'
,
key
:
'hiddenTrouble'
},
{
title
:
'需加强消防管理'
,
dataIndex
:
'adminOfFire'
,
key
:
'adminOfFire'
},
{
title
:
'安全负责人'
,
dataIndex
:
'chargePerson'
,
key
:
'chargePerson'
},
{
title
:
'联系电话'
,
dataIndex
:
'chargePersonTel'
,
key
:
'chargePersonTel'
},
{
title
:
'治理完成日期'
,
dataIndex
:
'completionDate'
,
key
:
'completionDate'
},
{
title
:
'实际完成日期'
,
dataIndex
:
'reCompletionDate'
,
key
:
'reCompletionDate'
},
{
title
:
'状态'
,
render
:
(
text
,
record
)
=>
{
return
(
<
div
className
=
"states-Icon"
>
{
record
.
status
===
'已完成'
&&
<
div
className
=
"color-box"
style
=
{{
background
:
'#00ff11'
}}
>
<
/div>
}
{
record
.
status
===
'未处理'
&&
<
div
className
=
"color-box"
style
=
{{
background
:
'#0088ff'
}}
>
<
/div>
}
<
div
className
=
"states-text"
>
{
record
.
status
}
<
/div
>
<
/div>
)
;
}
},
{
title
:
'操作'
,
render
:
(
text
,
record
)
=>
{
return
(
<
a
onClick
=
{()
=>
this
.
ShowMore
(
record
)}
>
{
record
.
status
===
'已完成'
&&
<
span
>
查看
<
/span>
}
{
record
.
status
===
'未处理'
&&
<
span
>
治理
<
/span>
}
<
/a
>
);
}
}
];
const
alarmColumns
=
[
{
title
:
'序号'
,
render
:
(
text
,
record
,
index
)
=>
`
${
index
+
1
}
`
},{
title
:
'告警类型'
,
render
:
(
text
,
record
,
index
)
=>
'故障报警'
,
key
:
'typeName'
},
{
title
:
'设备名称'
,
dataIndex
:
'name'
,
key
:
'GJname'
},
{
title
:
'故障描述'
,
dataIndex
:
'persent'
,
key
:
'GJpersent'
},
{
title
:
'处理结果'
,
render
:
(
text
,
record
)
=>
{
return
(
<
div
>
{
dataStates
===
'1'
&&
<
Select
defaultValue
=
{
record
.
doneResult
}
onChange
=
{(
e
,
a
)
=>
this
.
selectOnChange
(
record
,
e
,
'warnningData'
)}
>
<
Option
key
=
"0"
value
=
"0"
>
未开始
<
/Option
>
<
Option
key
=
"1"
value
=
"1"
>
已完成
<
/Option
>
<
/Select>
}
{
dataStates
===
'2'
&&
<
span
>
{
record
.
doneResult
===
'0'
?
'未开始'
:
'已完成'
}
<
/span>
}
<
/div>
)
;
}
},
{
title
:
'治理凭证'
,
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
div
>
{
dataStates
===
'1'
&&
<
div
onClick
=
{()
=>
this
.
chossFileList
(
index
)}
>
<
Upload
fileList
=
{
this
.
state
.
warmningFileList
[
`fileList
${
index
}
`
]}
beforeUpload
=
{
this
.
beforeUploadWarmningFileList
}
onPreview
=
{
this
.
handlePreview
}
onRemove
=
{
this
.
warmningFileListRemove
}
multiple
>
<
i
className
=
"icon amosicon"
>&
#
xe63a
;
<
/i
>
<
a
>
上传
<
/a
>
<
/Upload
>
<
/div>
}
{
dataStates
===
'2'
&&
<
div
onClick
=
{()
=>
this
.
downLoad
(
record
.
filePath
,
'告警信息'
)}
>
<
i
className
=
"icon amosicon"
>&
#
xe611
;
<
/i
>
<
a
>
下载
<
/a
>
<
/div>
}
<
/div
>
);
}
}
];
const
riskColumns
=
[
{
title
:
'序号'
,
render
:
(
text
,
record
,
index
)
=>
`
${
index
+
1
}
`
},{
title
:
'风险等级'
,
dataIndex
:
'lvl'
,
key
:
'FXlvl'
},
{
title
:
'风险描述'
,
dataIndex
:
'persent'
,
key
:
'FXpersent'
},
{
title
:
'风险影响'
,
dataIndex
:
'affect'
,
key
:
'FXaffect'
},
{
title
:
'反馈'
,
render
:
(
text
,
record
)
=>
{
return
<
a
onClick
=
{()
=>
this
.
popupCustom
(
record
,
dataStates
)}
>
反馈
<
/a>
;
}
}
];
const
dangerColumns
=
[
{
title
:
'序号'
,
render
:
(
text
,
record
,
index
)
=>
`
${
index
+
1
}
`
},
{
title
:
'隐患等级'
,
dataIndex
:
'lvl'
,
key
:
'YHlvl'
},
{
title
:
'隐患描述'
,
dataIndex
:
'persent'
,
key
:
'YHpersent'
},
{
title
:
'隐患影响'
,
dataIndex
:
'affect'
,
key
:
'YHaffect'
},
{
title
:
'处理结果'
,
render
:
(
text
,
record
)
=>
{
return
(
<
div
>
{
dataStates
===
'1'
&&
<
Select
defaultValue
=
{
record
.
doneResult
}
onChange
=
{(
e
,
a
)
=>
this
.
selectOnChange
(
record
,
e
,
'hiddenData'
)}
>
<
Option
key
=
"0"
value
=
"0"
>
未开始
<
/Option
>
<
Option
key
=
"1"
value
=
"1"
>
已完成
<
/Option
>
<
/Select>
}
{
dataStates
===
'2'
&&
<
span
>
{
record
.
doneResult
===
'0'
?
'未开始'
:
'已完成'
}
<
/span>
}
<
/div>
)
;
}
},
{
title
:
'治理凭证'
,
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
div
>
{
dataStates
===
'1'
&&
<
div
onClick
=
{()
=>
this
.
chossFileList
(
index
)}
>
<
Upload
fileList
=
{
this
.
state
.
hiddenFileList
[
`fileList
${
index
}
`
]}
beforeUpload
=
{
this
.
beforeUploadhiddenFileList
}
onPreview
=
{
this
.
handlePreview
}
onRemove
=
{
this
.
hiddenFileListRemove
}
multiple
>
<
i
className
=
"icon amosicon"
>&
#
xe63a
;
<
/i
>
<
a
>
上传
<
/a
>
<
/Upload
>
<
/div>
}
{
dataStates
===
'2'
&&
<
div
onClick
=
{()
=>
this
.
downLoad
(
record
.
filePath
,
'隐患信息'
)}
>
<
i
className
=
"icon amosicon"
>&
#
xe611
;
<
/i
>
<
a
>
下载
<
/a
>
<
/div>
}
<
/div
>
);
}
}
];
const
dataStates
=
this
.
state
.
dataStates
;
const
{
previewImage
,
previewVisible
}
=
this
.
state
;
const
{
base
,
warnnings
,
danger
,
hidden
,
fires
,
backResult
}
=
this
.
state
.
showMoreData
;
return
(
<
div
className
=
"sefety-bills"
>
{
!
this
.
state
.
detailVisible
&&
<
CommonContainer
>
<
div
className
=
"search-bgc"
>
<
div
className
=
"top-search"
>
单据号:
<
Search
placeholder
=
"搜索"
onSearch
=
{
this
.
handleSearch
}
/
>
<
div
className
=
"finish-date"
>
<
span
>
要求完成治理日期:
<
/span
>
<
DatePicker
format
=
"YYYY-MM-DD"
placeholder
=
'年-月-日'
onChange
=
{(
e
)
=>
this
.
handlerWhenDataChange
(
'sDate'
,
e
)}
/
>
<
DatePicker
format
=
"YYYY-MM-DD"
placeholder
=
'年-月-日'
onChange
=
{(
e
)
=>
this
.
handlerWhenDataChange
(
'eDate'
,
e
)}
/
>
<
/div
>
<
div
className
=
"finish-date"
>
<
span
>
状态:
<
/span
>
<
Select
defaultValue
=
"0"
value
=
{
this
.
state
.
form
.
states
}
onChange
=
{(
e
)
=>
this
.
handlerWhenDataChange
(
'states'
,
e
)}
>
<
Option
key
=
"0"
value
=
"0"
>
全选
<
/Option
>
<
Option
key
=
"1"
value
=
"1"
>
未处理
<
/Option
>
<
Option
key
=
"2"
value
=
"2"
>
已完成
<
/Option
>
<
/Select
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"safety-table"
>
<
div
className
=
"ant-table-header"
>
<
/div
>
<
Table
pagination
=
{
false
}
columns
=
{
columns
}
dataSource
=
{
this
.
state
.
billData
}
rowKey
=
{
record
=>
record
.
billno
+
this
.
state
.
timestamp
}
/
>
<
/div
>
<
Pagination
defaultCurrent
=
{
this
.
state
.
form
.
pageNum
}
current
=
{
this
.
state
.
form
.
pageNum
}
size
=
"small"
total
=
{
this
.
state
.
pageCount
}
onChange
=
{(
e
)
=>
this
.
handlerWhenDataChange
(
'pageNum'
,
e
)}
showSizeChanger
onShowSizeChange
=
{(
e
,
a
)
=>
this
.
handlerWhenDataChange
(
'pageSize'
,
a
)}
/
>
<
/CommonContainer>
}
<
DetailContent
detailVisible
=
{
this
.
state
.
detailVisible
}
handleClose
=
{
this
.
handleClose
}
savePack
=
{(
e
)
=>
this
.
savePack
(
e
)}
states
=
{
dataStates
}
>
<
div
className
=
"conten-modal"
>
<
Modal
className
=
'preview-photo-modal'
content
=
{
<
div
style
=
{{
width
:
'560px'
,
maxHeight
:
'500px'
,
overflowY
:
'scroll'
}}
>
<
img
style
=
{{
width
:
'520px'
}}
src
=
{
previewImage
}
alt
=
" "
/>
<
/div>
}
visible
=
{
previewVisible
}
noDefaultFooter
onCancel
=
{
this
.
handleCancel
}
/
>
<
ContentModal
alarmColumns
=
{
alarmColumns
}
riskColumns
=
{
riskColumns
}
dangerColumns
=
{
dangerColumns
}
headerData
=
{
base
}
alarmInfo
=
{
warnnings
}
riskInfo
=
{
danger
}
dangerInfo
=
{
hidden
}
fires
=
{
fires
}
backResult
=
{
backResult
}
types
=
{
this
.
state
.
types
}
states
=
{
dataStates
}
DataPack
=
{(
e
)
=>
this
.
DataPack
(
e
)}
/
>
<
/div
>
<
/DetailContent
>
<
/div
>
);
}
}
export
default
FireRectification
;
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