Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
oEshield
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 74e9eed3
authored
Sep 19, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
临时解决版本共存问题
1 parent
928ff08c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
9 deletions
src/pages/monitor/fenceMap.vue
src/pages/monitor/replay.vue
src/pages/monitor/test.json
src/utils/mapInit.js
src/pages/monitor/fenceMap.vue
View file @
74e9eed
...
@@ -273,6 +273,9 @@ export default {
...
@@ -273,6 +273,9 @@ export default {
mapObj
.
plugin
([
"AMap.CircleEditor"
],
()
=>
{
mapObj
.
plugin
([
"AMap.CircleEditor"
],
()
=>
{
this
.
circleEditor
=
new
AMap
.
CircleEditor
(
mapObj
,
this
.
fenceCircle
);
this
.
circleEditor
=
new
AMap
.
CircleEditor
(
mapObj
,
this
.
fenceCircle
);
// this.circleEditor.on("adjust", function (e) {
// console.log(e);
// });
AMap
.
event
.
addListener
(
this
.
circleEditor
,
"adjust"
,
(
e
)
=>
{
AMap
.
event
.
addListener
(
this
.
circleEditor
,
"adjust"
,
(
e
)
=>
{
this
.
radius
=
e
.
radius
/
1
;
this
.
radius
=
e
.
radius
/
1
;
this
.
$emit
(
"onUpdateMapData"
,
{
this
.
$emit
(
"onUpdateMapData"
,
{
...
...
src/pages/monitor/replay.vue
View file @
74e9eed
...
@@ -202,7 +202,6 @@ import InfiniteLoading from "vue-infinite-loading";
...
@@ -202,7 +202,6 @@ import InfiniteLoading from "vue-infinite-loading";
import
MapControll
from
"./MapControll.vue"
;
import
MapControll
from
"./MapControll.vue"
;
import
{
replayShortcuts
}
from
"@/common/index"
;
import
{
replayShortcuts
}
from
"@/common/index"
;
import
{
GET_ELECFENCE_INFO
}
from
"@/api/services/fence"
;
import
{
GET_ELECFENCE_INFO
}
from
"@/api/services/fence"
;
import
listJson
from
"./test.json"
;
export
default
{
export
default
{
data
()
{
data
()
{
let
checkDaterange
=
(
rule
,
vaule
,
cb
)
=>
{
let
checkDaterange
=
(
rule
,
vaule
,
cb
)
=>
{
...
@@ -444,7 +443,6 @@ export default {
...
@@ -444,7 +443,6 @@ export default {
MONITOR_SERVICE
.
getTrackHistory
(
params
).
then
((
result
)
=>
{
MONITOR_SERVICE
.
getTrackHistory
(
params
).
then
((
result
)
=>
{
//result = mock.getTrackHistory
//result = mock.getTrackHistory
console
.
log
(
result
);
console
.
log
(
result
);
result
=
listJson
;
if
(
result
.
code
==
"200"
)
{
if
(
result
.
code
==
"200"
)
{
let
data
=
result
.
data
;
let
data
=
result
.
data
;
this
.
replayData
=
data
;
this
.
replayData
=
data
;
...
...
src/pages/monitor/test.json
deleted
100644 → 0
View file @
928ff08
This diff is collapsed.
Click to expand it.
src/utils/mapInit.js
View file @
74e9eed
...
@@ -5,13 +5,33 @@ export const mapInit = params => {
...
@@ -5,13 +5,33 @@ export const mapInit = params => {
let
options
=
params
||
{};
let
options
=
params
||
{};
// let plugins = options.plugins|| CONSTANT.MAP_PLUGINS;
// let plugins = options.plugins|| CONSTANT.MAP_PLUGINS;
// let version = options.version || '2.0';
// let version = options.version || '2.0';
if
(
window
.
AMap
){
console
.
log
(
window
.
window
)
resolve
(
window
.
AMap
)
console
.
log
(
window
.
AMap
);
return
false
;
let
_list
=
window
.
localStorage
||
{};
}
// if(window.AMap){
// let _amap = window.AMap|| {};
// console.log(_amap.version)
// if(options.version == _amap.version){
// resolve(window.AMap);
// }else{
// delete window.AMap;
// delete window.AMapUI;
// delete window.Loca;
// // 删除高德地图缓存,防止出现禁止多种API加载方式混用的bug
// for(let k in _list){
// if(k.indexOf('_AMap') == 0){
// localStorage.removeItem(k);
// }
// }
// }
// }
let
mapConfig
=
{...
options
};
let
mapConfig
=
{...
options
};
mapConfig
.
key
=
CONSTANT
.
MAP_KEY
;
// 申请好的Web端开发者Key,首次调用 load 时必填
mapConfig
.
key
=
CONSTANT
.
MAP_KEY
;
// 申请好的Web端开发者Key,首次调用 load 时必填
mapConfig
.
version
=
options
.
version
||
'2.0'
;
;
// 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
mapConfig
.
version
=
options
.
version
||
'2.0'
;
// 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
mapConfig
.
plugins
=
options
.
plugins
||
CONSTANT
.
MAP_PLUGINS
;
// 需要使用的的插件列表,如比例尺'AMap.Scale'等
mapConfig
.
plugins
=
options
.
plugins
||
CONSTANT
.
MAP_PLUGINS
;
// 需要使用的的插件列表,如比例尺'AMap.Scale'等
if
(
options
.
AMapUI
){
if
(
options
.
AMapUI
){
mapConfig
.
AMapUI
=
options
.
AMapUI
;
mapConfig
.
AMapUI
=
options
.
AMapUI
;
...
@@ -22,9 +42,8 @@ export const mapInit = params => {
...
@@ -22,9 +42,8 @@ export const mapInit = params => {
resolve
(
AMap
);
resolve
(
AMap
);
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
console
.
log
(
error
);
window
.
location
.
reload
(
);
reject
(
error
);
reject
(
error
);
});
});
})
})
}
}
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment