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
8b039539
Commit
8b039539
authored
Dec 14, 2020
by
zhengjiawei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
功能调整
parent
df16262d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
11 deletions
+55
-11
amos.config.js
amos.config.js
+1
-1
AlarmView.js
src/view/bizview/situation/alarm/AlarmView.js
+11
-4
index.js
src/view/bizview/stationMainten/index.js
+34
-2
indexMap.js
src/view/bizview/stationMainten/indexMap.js
+9
-4
No files found.
amos.config.js
View file @
8b039539
...
...
@@ -116,7 +116,7 @@
//地图zoom显示级别
// showZoom: [7, 13, 18],
//离线地图地址
picURI
:
'http://172.16.
9.20:9090/
'
picURI
:
'http://172.16.
3.121:8001/shanxi/amap
'
};
// 配置日志系统
...
...
src/view/bizview/situation/alarm/AlarmView.js
View file @
8b039539
...
...
@@ -15,13 +15,20 @@ const getColumns = () => {
title
:
'设备编号'
,
dataIndex
:
'fireEquipmentCode'
,
key
:
'fireEquipmentCode'
,
width
:
'1
2
%'
,
width
:
'1
0
%'
,
className
:
'uant-table-thead'
},
{
title
:
'设备名称'
,
dataIndex
:
'fireEquipmentName'
,
key
:
'fireEquipmentName'
,
width
:
'20%'
,
className
:
'uant-table-thead'
},
{
title
:
'所在区域'
,
dataIndex
:
'source_name'
,
key
:
'source_name'
,
width
:
'15%'
,
className
:
'uant-table-thead'
},
...
...
@@ -29,7 +36,7 @@ const getColumns = () => {
title
:
'指标名称'
,
dataIndex
:
'eq_point_name'
,
key
:
'eq_point_name'
,
width
:
'
2
0%'
,
width
:
'
1
0%'
,
className
:
'uant-table-thead'
},
{
...
...
@@ -57,14 +64,14 @@ const getColumns = () => {
title
:
'保护对象'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
width
:
'1
5
%'
,
width
:
'1
0
%'
,
className
:
'uant-table-thead'
},
{
title
:
'上报时间'
,
dataIndex
:
'create_date'
,
key
:
'create_date'
,
width
:
'
15
%'
,
width
:
'
20
%'
,
render
:
text
=>
moment
(
text
).
format
(
'YYYY-MM-DD HH:mm:ss'
),
className
:
'uant-table-thead'
}
...
...
src/view/bizview/stationMainten/index.js
View file @
8b039539
...
...
@@ -146,6 +146,10 @@ class StationMainten extends Component {
const
{
form
}
=
this
.
state
;
form
.
safetyChargeUserId
=
value
;
}
onSelectCaptainCharge
=
value
=>
{
const
{
form
}
=
this
.
state
;
form
.
fireCaptainUserId
=
value
;
}
// 行政划区选择
onChangeAddress
=
(
value
,
item
)
=>
{
...
...
@@ -274,12 +278,19 @@ class StationMainten extends Component {
const
{
allUserList
,
form
}
=
this
.
state
;
const
stationChargeName
=
allUserList
.
filter
(
item
=>
item
.
userId
===
dataValues
.
stationChargeUserId
)[
0
].
realName
;
const
safetyChargeName
=
allUserList
.
filter
(
item
=>
item
.
userId
===
dataValues
.
safetyChargeUserId
)[
0
].
realName
;
const
fireCaptainName
=
allUserList
.
filter
(
item
=>
item
.
userId
===
dataValues
.
fireCaptainUserId
)[
0
].
realName
;
const
stationUserPhoneNum
=
allUserList
.
filter
(
item
=>
item
.
userId
===
dataValues
.
stationChargeUserId
)[
0
].
mobile
;
const
safetyUserPhoneNum
=
allUserList
.
filter
(
item
=>
item
.
userId
===
dataValues
.
safetyChargeUserId
)[
0
].
mobile
;
const
fireCaptainPhoneNum
=
allUserList
.
filter
(
item
=>
item
.
userId
===
dataValues
.
fireCaptainUserId
)[
0
].
mobile
;
dataValues
.
stationChargeUserName
=
stationChargeName
;
dataValues
.
safetyChargeUserName
=
safetyChargeName
;
dataValues
.
fireCaptainName
=
fireCaptainName
;
dataValues
.
stationUserPhoneNum
=
stationUserPhoneNum
;
dataValues
.
safetyUserPhoneNum
=
safetyUserPhoneNum
;
dataValues
.
fireCaptainPhoneNum
=
fireCaptainPhoneNum
;
dataValues
.
status
=
form
.
status
;
let
param
=
dataValues
;
addStationMaintenAction
(
param
).
then
(
...
...
@@ -366,6 +377,10 @@ class StationMainten extends Component {
render
()
{
const
{
form
,
rules
,
useTypeData
,
provinceData
,
cityData
,
countyData
,
allUserList
,
BasicMap
,
isCanEidt
,
canEdit
,
canlSHow
}
=
this
.
state
;
const
lalng
=
{
longitude
:
form
.
longitude
,
latitude
:
form
.
latitude
};
const
formItemLayout
=
{
labelCol
:
{
xs
:
{
span
:
24
},
...
...
@@ -460,10 +475,11 @@ class StationMainten extends Component {
<
span
className
=
"left-address-span"
>
区县
<
/span
>
<
/FormItem
>
<
FormItem
label
=
{
<
span
>
详细地址
<
/span>} field="address" {...formItemLayout}
>
<
TextArea
rows
=
{
5
}
<
TextArea
rows
=
{
3
}
className
=
"left-textArea"
disabled
=
{
!
isCanEidt
}
value
=
{
form
.
address
}
disableResize
placeholder
=
"详细地址"
onChange
=
{
e
=>
this
.
onInputChange
(
'address'
,
e
.
target
.
value
)}
/
>
...
...
@@ -510,6 +526,22 @@ class StationMainten extends Component {
{
!
isCanEidt
&&
form
.
status
===
0
&&
<
div
className
=
"text-div"
>
{
'启用'
}
<
/div>
}
{
!
isCanEidt
&&
form
.
status
===
1
&&
<
div
className
=
"text-div"
>
{
'停用'
}
<
/div>
}
<
/FormItem
>
<
FormItem
label
=
{
<
span
>
驻站消防队队长
<
/span>} field="fireCaptain" {...formItemLayout}
>
<
Row
style
=
{{
width
:
'400px'
}}
>
<
Col
span
=
{
9
}
>
<
Select
data
=
{
allUserList
}
field
=
"fireCaptain"
className
=
"left-station-select"
disabled
=
{
!
isCanEidt
}
value
=
{
form
.
fireCaptainUserId
}
renderOption
=
{
item
=>
<
Option
value
=
{
item
.
userId
}
>
{
item
.
realName
}
<
/Option>
}
defaultOption
=
{
<
Option
>
请选择
<
/Option>
}
onChange
=
{
this
.
onSelectCaptainCharge
}
/
>
<
/Col
>
<
/Row
>
<
/FormItem
>
<
FormItem
label
=
{
<
span
>
换流站负责人
<
/span>} field="stationChargeUserName" {...formItemLayout}
>
<
Row
style
=
{{
width
:
'400px'
}}
>
<
Col
span
=
{
9
}
>
...
...
@@ -554,7 +586,7 @@ class StationMainten extends Component {
<
Col
span
=
{
12
}
style
=
{{
height
:
'614px'
,
border
:
'1px solid black'
}}
>
<
div
style
=
{{
height
:
'614px'
}}
>
{
/**this.state.loadAmap && <BasicMap indexViewChange={this.indexViewChange} pushMarkerPoint={this.handleMarkerMap} /> */
}
{
this
.
state
.
loadAmap
&&
<
BasicMap
indexViewChange
=
{
this
.
indexViewChange
}
pushMarkerPoint
=
{
this
.
handleMarkerMap
}
/>
}
{
this
.
state
.
loadAmap
&&
<
BasicMap
indexViewChange
=
{
this
.
indexViewChange
}
pushMarkerPoint
=
{
this
.
handleMarkerMap
}
lalng
=
{
lalng
}
isCanEidt
=
{
isCanEidt
}
/>
}
<
/div
>
<
/Col
>
<
/Row
>
...
...
src/view/bizview/stationMainten/indexMap.js
View file @
8b039539
...
...
@@ -26,7 +26,7 @@ const mapConfig = {
const
layers
=
[
new
window
.
AMap
.
TileLayer
({
getTileUrl
(
x
,
y
,
z
)
{
return
`
${
_picURI
}${
z
}
/
${
x
}
/
${
y
}
.png`
;
return
`
${
_picURI
}
/
${
z
}
/
${
x
}
/
${
y
}
.png`
;
},
zIndex
:
0
})
...
...
@@ -40,14 +40,16 @@ const layers = [
*/
class
IndexMap
extends
Component
{
static
propTypes
=
{
pushMarkerPoint
:
PropTypes
.
func
pushMarkerPoint
:
PropTypes
.
func
,
lalng
:
PropTypes
.
object
,
isCanEidt
:
PropTypes
.
bool
};
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
mapCenter
:
_mapCenter
,
center
:
{
longitude
:
101.90771484
,
latitude
:
35.92184115
},
marker
:
{
longitude
:
0
,
latitude
:
0
},
marker
:
this
.
props
.
lalng
||
{
longitude
:
0
,
latitude
:
0
},
// marker: { longitude: null, latitude: null },
visible
:
true
,
style
:
{
strokeColor
:
'#10A100'
,
fillColor
:
'#10A100'
},
...
...
@@ -69,6 +71,9 @@ class IndexMap extends Component {
* @memberof IndexMap
*/
handleClickMap
=
e
=>
{
if
(
!
this
.
props
.
isCanEidt
)
{
return
;
}
const
{
marker
}
=
this
.
state
;
marker
.
longitude
=
e
.
lnglat
.
lng
;
marker
.
latitude
=
e
.
lnglat
.
lat
;
...
...
@@ -87,7 +92,7 @@ class IndexMap extends Component {
if
(
outMap
)
{
mapConfig
.
layers
=
layers
;
}
console
.
log
(
marker
)
return
(
<
div
className
=
"content indexPage"
style
=
{{
height
:
'612px'
}}
>
<
BaseMap
events
=
{
events
}
center
=
{
mapCenter
}
{...
mapConfig
}
>
...
...
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