Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
biz.qingxiao.com
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
wangxuelai
biz.qingxiao.com
Commits
c304fa77
Commit
c304fa77
authored
Oct 18, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/bww-v1'
parents
56aac82c
cb9d5a48
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
15 deletions
+26
-15
schooladd.js
src/models/schooladd.js
+3
-3
SelectPlace.js
src/pages/schooledit/SelectPlace.js
+18
-10
SelectPlace.less
src/pages/schooledit/SelectPlace.less
+4
-1
index.js
src/pages/schooledit/index.js
+1
-1
No files found.
src/models/schooladd.js
View file @
c304fa77
...
...
@@ -86,7 +86,7 @@ export default {
longitude
:
Number
(
schoolDetailData
.
data
.
longitude
),
latitude
:
Number
(
schoolDetailData
.
data
.
latitude
),
locationAddress
:
schoolDetailData
.
data
.
location_address
,
address
:
''
,
address
:
schoolDetailData
.
data
.
address
,
mobile
:
mobile
||
[
''
],
province
:
schoolDetailData
.
data
.
province
,
city
:
schoolDetailData
.
data
.
city
,
...
...
@@ -194,7 +194,7 @@ export default {
title
,
longitude
,
latitude
,
location_address
:
locationAddress
,
location_address
:
province
+
city
+
district
+
locationAddress
,
address
:
locationAddress
,
logo
:
''
,
category
:
selectcategorys
.
join
(
','
),
...
...
@@ -228,7 +228,7 @@ export default {
title
,
longitude
,
latitude
,
location_address
:
locationAddress
,
location_address
:
province
+
city
+
district
+
locationAddress
,
address
:
locationAddress
,
logo
:
''
,
category
:
selectcategorys
.
join
(
','
),
...
...
src/pages/schooledit/SelectPlace.js
View file @
c304fa77
...
...
@@ -11,7 +11,6 @@ class SelectPlaceMap extends React.Component {
super
(
props
);
this
.
state
=
{
location
:
[],
address
:
''
,
locationList
:
[],
locationIndex
:
-
1
,
};
...
...
@@ -60,13 +59,13 @@ class SelectPlaceMap extends React.Component {
const
info
=
new
qq
.
maps
.
InfoWindow
({
map
:
that
.
map
,
position
:
that
.
map
.
center
,
content
:
locationAddress
,
content
:
`<div>地址:
${
address
}
<div>`
,
zIndex
:
99
,
visible
:
true
,
});
qq
.
maps
.
event
.
addListener
(
pointMarker
,
'click'
,
()
=>
{
info
.
open
();
info
.
setContent
(
locationA
ddress
);
info
.
setContent
(
a
ddress
);
info
.
setPosition
(
showLatlng
);
});
that
.
pointArray
.
push
(
pointMarker
);
...
...
@@ -87,7 +86,7 @@ class SelectPlaceMap extends React.Component {
showLatlng
=
new
qq
.
maps
.
LatLng
(
res
.
result
.
location
.
lat
,
res
.
result
.
location
.
lng
);
let
title
=
''
;
if
(
res
.
result
.
address_component
.
province
)
{
title
=
res
.
result
.
address_component
.
province
+
res
.
result
.
address_component
.
city
+
res
.
result
.
formatted_addresses
.
rough
;
title
=
res
.
result
.
formatted_addresses
.
rough
;
dispatch
({
type
:
'schooladd/updateState'
,
payload
:
{
...
...
@@ -97,6 +96,7 @@ class SelectPlaceMap extends React.Component {
province
:
res
.
result
.
address_component
.
province
,
city
:
res
.
result
.
address_component
.
city
,
district
:
res
.
result
.
address_component
.
district
,
address
:
title
,
},
});
}
...
...
@@ -108,7 +108,7 @@ class SelectPlaceMap extends React.Component {
if
(
title
!=
''
)
{
const
info
=
new
qq
.
maps
.
InfoWindow
({
map
:
that
.
map
,
content
:
title
||
''
,
content
:
`<div>地址:
${
title
}
<div>`
,
position
:
showLatlng
,
zIndex
:
99
,
visible
:
true
,
...
...
@@ -222,6 +222,7 @@ class SelectPlaceMap extends React.Component {
province
:
this
.
state
.
locationList
[
index
].
ad_info
.
province
,
city
:
this
.
state
.
locationList
[
index
].
ad_info
.
city
,
district
:
this
.
state
.
locationList
[
index
].
ad_info
.
district
,
address
:
`
${
this
.
state
.
locationList
[
index
].
title
}
`
,
},
});
// message.success('已将该地址导入为机构地址,不要忘记保存哦', 2);
...
...
@@ -243,6 +244,7 @@ class SelectPlaceMap extends React.Component {
province
:
this
.
state
.
locationList
[
index
].
ad_info
.
province
,
city
:
this
.
state
.
locationList
[
index
].
ad_info
.
city
,
district
:
this
.
state
.
locationList
[
index
].
ad_info
.
district
,
address
:
`
${
this
.
state
.
locationList
[
index
].
title
}
`
,
},
});
// message.success('已将该地址导入为机构地址,不要忘记保存哦', 2);
...
...
@@ -255,7 +257,9 @@ class SelectPlaceMap extends React.Component {
this
.
markerArray
[
index
].
setZIndex
(
this
.
markerArray
.
length
);
}
searchAddress
=
()
=>
{
const
{
dispatch
,
locationAddress
,
city
}
=
this
.
props
;
const
{
dispatch
,
locationAddress
,
city
,
address
,
}
=
this
.
props
;
this
.
pointArray
.
forEach
((
ele
)
=>
{
ele
.
setMap
(
null
);
});
...
...
@@ -321,9 +325,10 @@ class SelectPlaceMap extends React.Component {
province
:
this
.
state
.
locationList
[
index
].
ad_info
.
province
,
city
:
this
.
state
.
locationList
[
index
].
ad_info
.
city
,
district
:
this
.
state
.
locationList
[
index
].
ad_info
.
district
,
address
:
`
${
this
.
state
.
locationList
[
index
].
title
}
`
,
},
});
message
.
success
(
'已将该地址导入为机构地址,不要忘记保存哦'
,
2
);
//
message.success('已将该地址导入为机构地址,不要忘记保存哦', 2);
});
this
.
listener_arr
.
push
(
listener3
);
this
.
map
.
fitBounds
(
this
.
latlngBounds
);
...
...
@@ -331,11 +336,12 @@ class SelectPlaceMap extends React.Component {
});
}
searchinput
=
(
e
)
=>
{
const
{
dispatch
,
locationAddress
}
=
this
.
props
;
const
{
dispatch
,
locationAddress
,
address
}
=
this
.
props
;
dispatch
({
type
:
'schooladd/updateState'
,
payload
:
{
locationAddress
:
e
.
target
.
value
,
address
:
e
.
target
.
value
,
},
});
}
...
...
@@ -350,10 +356,10 @@ class SelectPlaceMap extends React.Component {
city
,
district
,
locationAddress
,
address
,
}
=
this
.
props
;
const
{
location
,
address
,
locationList
,
locationIndex
,
}
=
this
.
state
;
...
...
@@ -391,7 +397,7 @@ class SelectPlaceMap extends React.Component {
className
=
"loginrow"
>
<
span
className
=
{
pageStyles
.
formitenname
}
>
详细地址:
<
/span
>
<
Input
placeholder
=
"请输入详细地址"
className
=
{
pageStyles
.
addressinput
}
value
=
{
locationA
ddress
}
onChange
=
{
e
=>
this
.
searchinput
(
e
)}
/
>
<
Input
placeholder
=
"请输入详细地址"
className
=
{
pageStyles
.
addressinput
}
value
=
{
a
ddress
}
onChange
=
{
e
=>
this
.
searchinput
(
e
)}
/
>
<
Button
type
=
"primary"
className
=
{
pageStyles
.
searchbtn
}
onClick
=
{
this
.
searchAddress
}
>
搜索地图
<
/Button
>
<
/FormItem
>
<
/Col
>
...
...
@@ -443,6 +449,7 @@ function mapStateToProps(state) {
province
,
city
,
district
,
address
,
}
=
state
.
schooladd
;
return
{
categorys
,
...
...
@@ -456,6 +463,7 @@ function mapStateToProps(state) {
province
,
city
,
district
,
address
,
};
}
export
default
connect
(
mapStateToProps
)(
SelectPlace
);
src/pages/schooledit/SelectPlace.less
View file @
c304fa77
...
...
@@ -390,7 +390,10 @@
width: 253px;
overflow-y: scroll;
border: 1px solid rgba(0,0,0,0.1);
height: 400px;
height: 500px;
position: absolute;
right: 0;
background-color: #fff;
}
.mapcontainer {
width: 700px;
...
...
src/pages/schooledit/index.js
View file @
c304fa77
...
...
@@ -277,7 +277,7 @@ class SchoolAddForm extends React.Component {
{
/* <Col xs={{ span: 6, offset: 9 }} md={{ span: 3, offset: 0 }} lg={{ span: 2, offset: 0 }} xl={{ span: 2, offset: 0 }} className={pageStyles.addschool}>添加</Col> */
}
<
/Row
>
<
Row
>
<
Col
xs
=
{{
span
:
2
2
}}
md
=
{{
span
:
20
}}
>
<
Col
xs
=
{{
span
:
2
4
}}
md
=
{{
span
:
24
}}
>
<
ChoosePosition
/>
<
/Col
>
<
/Row
>
...
...
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