Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
Jz-Php
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
PHP
Jz-Php
Commits
ee52c62a
提交
ee52c62a
authored
1月 16, 2020
作者:
chengye
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复地图显示bug
上级
90241e29
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
145 行增加
和
114 行删除
+145
-114
workspace.xml
.idea/workspace.xml
+42
-12
base_map.html
application/admin/view/basestation/base_map.html
+103
-102
没有找到文件。
.idea/workspace.xml
浏览文件 @
ee52c62a
...
...
@@ -2,8 +2,7 @@
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"f51c1393-9404-4c81-be85-d91ed40531b3"
name=
"默认更改列表"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/application/admin/controller/Basestation.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/application/admin/controller/Basestation.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/application/admin/view/basestation/base_map.html"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/application/admin/view/basestation/base_map.html"
afterDir=
"false"
/>
</list>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
...
...
@@ -43,11 +42,23 @@
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"
tru
e"
>
<file
pinned=
"false"
current-in-tab=
"
fals
e"
>
<entry
file=
"file://$PROJECT_DIR$/application/admin/controller/Basestation.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"295"
>
<caret
line=
"735"
column=
"42"
lean-forward=
"true"
selection-start-line=
"735"
selection-start-column=
"42"
selection-end-line=
"735"
selection-end-column=
"42"
/>
<state
relative-caret-position=
"388"
>
<caret
line=
"738"
column=
"34"
lean-forward=
"true"
selection-start-line=
"738"
selection-start-column=
"34"
selection-end-line=
"738"
selection-end-column=
"34"
/>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/application/admin/view/basestation/base_map.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"512"
>
<caret
line=
"132"
column=
"9"
selection-start-line=
"132"
selection-start-column=
"9"
selection-end-line=
"132"
selection-end-column=
"9"
/>
<folding>
<element
signature=
"n#style#0;n#p#0;n#!!top"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
...
...
@@ -84,6 +95,7 @@
<option
value=
"$PROJECT_DIR$/application/em/controller/Invoice.php"
/>
<option
value=
"$PROJECT_DIR$/application/em/model/EmInvoice.php"
/>
<option
value=
"$PROJECT_DIR$/application/admin/controller/Basestation.php"
/>
<option
value=
"$PROJECT_DIR$/application/admin/view/basestation/base_map.html"
/>
</list>
</option>
</component>
...
...
@@ -132,7 +144,15 @@
<item
name=
"E:\master\Jz-Php"
type=
"442cc68d:ScopeViewTreeModel$RootNode"
/>
<item
name=
"application"
type=
"9f88c78c:ScopeViewTreeModel$FileNode"
/>
<item
name=
"admin"
type=
"9f88c78c:ScopeViewTreeModel$FileNode"
/>
<item
name=
"controller"
type=
"9f88c78c:ScopeViewTreeModel$FileNode"
/>
<item
name=
"view"
type=
"9f88c78c:ScopeViewTreeModel$FileNode"
/>
</path>
<path>
<item
name=
"Jz-Php"
type=
"3d21c010:ScopeViewTreeModel$ProjectNode"
/>
<item
name=
"E:\master\Jz-Php"
type=
"442cc68d:ScopeViewTreeModel$RootNode"
/>
<item
name=
"application"
type=
"9f88c78c:ScopeViewTreeModel$FileNode"
/>
<item
name=
"admin"
type=
"9f88c78c:ScopeViewTreeModel$FileNode"
/>
<item
name=
"view"
type=
"9f88c78c:ScopeViewTreeModel$FileNode"
/>
<item
name=
"basestation"
type=
"9f88c78c:ScopeViewTreeModel$FileNode"
/>
</path>
<path>
<item
name=
"Jz-Php"
type=
"3d21c010:ScopeViewTreeModel$ProjectNode"
/>
...
...
@@ -195,18 +215,18 @@
<workItem
from=
"1578972376079"
duration=
"9405000"
/>
<workItem
from=
"1579059424177"
duration=
"1050000"
/>
<workItem
from=
"1579079847870"
duration=
"1330000"
/>
<workItem
from=
"1579164336952"
duration=
"
60
000"
/>
<workItem
from=
"1579164336952"
duration=
"
142
000"
/>
</task>
<servers
/>
</component>
<component
name=
"TimeTrackingManager"
>
<option
name=
"totallyTimeSpent"
value=
"17
792
000"
/>
<option
name=
"totallyTimeSpent"
value=
"17
874
000"
/>
</component>
<component
name=
"ToolWindowManager"
>
<frame
x=
"1358"
y=
"-125"
width=
"1936"
height=
"1056"
extended-state=
"6"
/>
<editor
active=
"true"
/>
<layout>
<window_info
active=
"true"
content_ui=
"combo"
id=
"Project"
order=
"0"
visible=
"true"
weight=
"0.15601704"
/>
<window_info
content_ui=
"combo"
id=
"Project"
order=
"0"
visible=
"true"
weight=
"0.15601704"
/>
<window_info
id=
"Structure"
order=
"1"
side_tool=
"true"
weight=
"0.25"
/>
<window_info
id=
"Favorites"
order=
"2"
side_tool=
"true"
/>
<window_info
anchor=
"bottom"
id=
"Message"
order=
"0"
/>
...
...
@@ -219,7 +239,7 @@
<window_info
anchor=
"bottom"
id=
"Docker"
order=
"7"
show_stripe_button=
"false"
/>
<window_info
anchor=
"bottom"
id=
"Database Changes"
order=
"8"
/>
<window_info
anchor=
"bottom"
id=
"Version Control"
order=
"9"
/>
<window_info
anchor=
"bottom"
id=
"Terminal"
order=
"10"
visible=
"true"
weight=
"0.2771739"
/>
<window_info
a
ctive=
"true"
a
nchor=
"bottom"
id=
"Terminal"
order=
"10"
visible=
"true"
weight=
"0.2771739"
/>
<window_info
anchor=
"bottom"
id=
"Event Log"
order=
"11"
side_tool=
"true"
/>
<window_info
anchor=
"right"
id=
"Commander"
internal_type=
"SLIDING"
order=
"0"
type=
"SLIDING"
weight=
"0.4"
/>
<window_info
anchor=
"right"
id=
"Ant Build"
order=
"1"
weight=
"0.25"
/>
...
...
@@ -342,8 +362,18 @@
</entry>
<entry
file=
"file://$PROJECT_DIR$/application/admin/controller/Basestation.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"295"
>
<caret
line=
"735"
column=
"42"
lean-forward=
"true"
selection-start-line=
"735"
selection-start-column=
"42"
selection-end-line=
"735"
selection-end-column=
"42"
/>
<state
relative-caret-position=
"388"
>
<caret
line=
"738"
column=
"34"
lean-forward=
"true"
selection-start-line=
"738"
selection-start-column=
"34"
selection-end-line=
"738"
selection-end-column=
"34"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/application/admin/view/basestation/base_map.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"512"
>
<caret
line=
"132"
column=
"9"
selection-start-line=
"132"
selection-start-column=
"9"
selection-end-line=
"132"
selection-end-column=
"9"
/>
<folding>
<element
signature=
"n#style#0;n#p#0;n#!!top"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
...
...
application/admin/view/basestation/base_map.html
浏览文件 @
ee52c62a
...
...
@@ -5,129 +5,129 @@
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"initial-scale=1.0, user-scalable=no"
/>
<style
type=
"text/css"
>
body
,
html
,
#allmap
{
width
:
100%
;
height
:
100%
;
overflow
:
hidden
;
margin
:
0
;
font-family
:
"微软雅黑"
;}
.BMap_cpyCtrl
{
display
:
none
;
}
.anchorBL
{
display
:
none
;
}
body
,
html
,
#allmap
{
width
:
100%
;
height
:
100%
;
overflow
:
hidden
;
margin
:
0
;
font-family
:
"微软雅黑"
;}
.BMap_cpyCtrl
{
display
:
none
;
}
.anchorBL
{
display
:
none
;
}
</style>
<link
rel=
"stylesheet"
href=
"__STATIC__/xadmin/css/font.css"
>
<link
rel=
"stylesheet"
href=
"__STATIC__/xadmin/css/font.css"
>
<link
rel=
"stylesheet"
href=
"__STATIC__/xadmin/css/xadmin.css"
>
<link
rel=
"stylesheet"
href=
"__STATIC__/xadmin/css/theme10.css"
>
<link
rel=
"stylesheet"
href=
"__STATIC__/font_1220417_290/iconfont.css"
>
<link
rel=
"stylesheet"
href=
"__STATIC__/admin/css/style.css"
>
<script
src=
"__STATIC__/xadmin/lib/layui/layui.js"
charset=
"utf-8"
></script>
<script
type=
"text/javascript"
src=
"__STATIC__/xadmin/js/xadmin.js"
></script>
<script
type=
"text/javascript"
src=
"http://api.map.baidu.com/api?v=2.0&ak=rhvOB6ZbAVXOb0yjajc6WOLFSCAsGGVC"
></script>
<title>
地图展示
</title>
</head>
<body>
<input
type=
"hidden"
name=
"station_id"
id=
"station_id"
value=
"{$data}"
>
<div
id=
"allmap"
></div>
<input
type=
"hidden"
name=
"station_id"
id=
"station_id"
value=
"{$data}"
>
<div
id=
"allmap"
></div>
</body>
</html>
<script
type=
"text/javascript"
>
layui
.
use
([
'layer'
],
function
(){
layui
.
use
([
'layer'
],
function
(){
$
=
layui
.
jquery
;
var
station_id
=
$
(
'#station_id'
).
val
();
$
.
get
(
"/basestation_region"
,{
station_id
:
station_id
},
function
(
result
){
region
(
result
[
0
][
'station_id'
],
result
[
0
][
'longitude'
],
result
[
0
][
'latitude'
],
result
[
0
][
'station_name'
],
result
[
0
][
'proj_number'
]);
function
region
(
id
,
lng
,
lat
,
station_name
,
proj_number
)
{
if
(
!
lng
){
layer
.
open
({
content
:
"暂无数据"
,
btn
:
[
'确定'
],
yes
:
function
()
{
layer
.
closeAll
();
// window.location.reload();
}
});
}
//初始化地图对象
var
bm
=
new
BMap
.
Map
(
"allmap"
,
{
enableMapClick
:
false
});
var
station_id
=
$
(
'#station_id'
).
val
();
$
.
get
(
"/basestation_region"
,{
station_id
:
station_id
},
function
(
result
){
region
(
result
[
'jz_code'
],
result
[
'jz_longitude'
],
result
[
'jz_latitude'
],
result
[
'jz_name'
],
result
[
'project_code'
]);
//转化GPS坐标到百度坐标
var
point
=
{
lng
:
lng
,
lat
:
lat
}
var
opts
=
{
width
:
200
,
// 信息窗口宽度
height
:
80
,
// 信息窗口高度
title
:
""
,
// 信息窗口标题
enableMessage
:
true
//设置允许信息窗发送短息
};
var
content
=
null
;
setTimeout
(
function
()
{
var
convertor
=
new
BMap
.
Convertor
();
var
pointArr
=
[];
pointArr
.
push
(
point
);
convertor
.
translate
(
pointArr
,
1
,
5
,
transCallBack
)
},
500
)
function
transCallBack
(
data
)
{
if
(
data
.
status
===
0
)
{
bm
.
centerAndZoom
(
data
.
points
[
0
],
15
);
var
mk
=
drawPoint
(
data
.
points
[
0
],
bm
)
bm
.
enableScrollWheelZoom
(
true
);
//启用滚轮放大缩小
content
=
"<p style= 'width: 200px;overflow: hidden;display: inline-block;text-overflow: ellipsis;white-space: nowrap;'>基站名称:"
+
station_name
+
"<br/>项目编号:"
+
proj_number
+
"<br/><a onclick=xadmin.add_tab('地图显示','/base_detai?id="
+
id
+
"',true,true)>查看详情</a></p>"
;
addClickHandler
(
content
,
mk
);
}
}
function
region
(
code
,
lng
,
lat
,
jz_name
,
project_code
)
{
if
(
!
lng
){
layer
.
open
({
content
:
"暂无数据"
,
btn
:
[
'确定'
],
yes
:
function
()
{
layer
.
closeAll
();
// window.location.reload();
}
});
}
//初始化地图对象
var
bm
=
new
BMap
.
Map
(
"allmap"
,
{
enableMapClick
:
false
});
//转化GPS坐标到百度坐标
var
point
=
{
lng
:
lng
,
lat
:
lat
}
var
opts
=
{
width
:
250
,
// 信息窗口宽度
height
:
80
,
// 信息窗口高度
title
:
""
,
// 信息窗口标题
enableMessage
:
true
//设置允许信息窗发送短息
};
var
content
=
null
;
setTimeout
(
function
()
{
var
convertor
=
new
BMap
.
Convertor
();
var
pointArr
=
[];
pointArr
.
push
(
point
);
convertor
.
translate
(
pointArr
,
1
,
5
,
transCallBack
)
},
500
)
function
transCallBack
(
data
)
{
if
(
data
.
status
===
0
)
{
bm
.
centerAndZoom
(
data
.
points
[
0
],
15
);
var
mk
=
drawPoint
(
data
.
points
[
0
],
bm
)
bm
.
enableScrollWheelZoom
(
true
);
//启用滚轮放大缩小
content
=
"<p style= 'width: 250px;overflow: hidden;display: inline-block;text-overflow: ellipsis;white-space: nowrap;'>基站号:"
+
code
+
"<br/>基站名称:"
+
jz_name
+
"<br/>项目编号:"
+
project_code
+
"<br/></p>"
;
addClickHandler
(
content
,
mk
);
}
}
//
//绘制坐标点
function
drawPoint
(
point
,
bm
,
animation
)
{
var
marker
=
new
BMap
.
Marker
(
point
);
//设置标注的经纬度
bm
.
addOverlay
(
marker
);
//把标注添加到地图上
if
(
animation
!==
undefined
)
{
marker
.
setAnimation
(
BMAP_ANIMATION_BOUNCE
)
}
return
marker
}
//绘制坐标点
function
drawPoint
(
point
,
bm
,
animation
)
{
var
marker
=
new
BMap
.
Marker
(
point
);
//设置标注的经纬度
bm
.
addOverlay
(
marker
);
//把标注添加到地图上
if
(
animation
!==
undefined
)
{
marker
.
setAnimation
(
BMAP_ANIMATION_BOUNCE
)
}
return
marker
}
// 从GPS转换到BD
function
gpsToBd
(
point
)
{
var
convertor
=
new
BMap
.
Convertor
();
var
pointArr
=
[];
pointArr
.
push
(
point
);
convertor
.
translate
(
pointArr
,
3
,
5
,
transCallBack
)
}
// 从GPS转换到BD
function
gpsToBd
(
point
)
{
var
convertor
=
new
BMap
.
Convertor
();
var
pointArr
=
[];
pointArr
.
push
(
point
);
convertor
.
translate
(
pointArr
,
3
,
5
,
transCallBack
)
}
// 从bd转GPS
function
bdToGps
(
point
)
{
var
bd09togcj02
=
coordtransform
.
bd09togcj02
(
point
.
lng
,
point
.
lat
);
var
gps
=
coordtransform
.
gcj02towgs84
(
bd09togcj02
[
0
],
bd09togcj02
[
1
]);
return
{
lng
:
gps
[
0
],
lat
:
gps
[
1
]
}
}
// 从bd转GPS
function
bdToGps
(
point
)
{
var
bd09togcj02
=
coordtransform
.
bd09togcj02
(
point
.
lng
,
point
.
lat
);
var
gps
=
coordtransform
.
gcj02towgs84
(
bd09togcj02
[
0
],
bd09togcj02
[
1
]);
return
{
lng
:
gps
[
0
],
lat
:
gps
[
1
]
}
}
function
addClickHandler
(
content
,
marker
){
marker
.
addEventListener
(
"mouseover"
,
function
(
e
){
openInfo
(
content
,
e
)}
);
}
function
addClickHandler
(
content
,
marker
){
marker
.
addEventListener
(
"mouseover"
,
function
(
e
){
openInfo
(
content
,
e
)}
);
}
function
openInfo
(
content
,
e
){
var
p
=
e
.
target
;
var
point
=
new
BMap
.
Point
(
p
.
getPosition
().
lng
,
p
.
getPosition
().
lat
);
var
infoWindow
=
new
BMap
.
InfoWindow
(
content
,
opts
);
// 创建信息窗口对象
bm
.
openInfoWindow
(
infoWindow
,
point
);
//开启信息窗口
}
function
openInfo
(
content
,
e
){
var
p
=
e
.
target
;
var
point
=
new
BMap
.
Point
(
p
.
getPosition
().
lng
,
p
.
getPosition
().
lat
);
var
infoWindow
=
new
BMap
.
InfoWindow
(
content
,
opts
);
// 创建信息窗口对象
bm
.
openInfoWindow
(
infoWindow
,
point
);
//开启信息窗口
}
}
});
}
});
});
</script>
});
</script>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论