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 c4d32c73
authored
Dec 03, 2025
by
wangzhihui
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
区域查车百度转高德
1 parent
05befc34
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
src/pages/monitor/zoneCar.vue
src/pages/monitor/zoneCar.vue
View file @
c4d32c7
...
@@ -569,14 +569,22 @@ export default {
...
@@ -569,14 +569,22 @@ export default {
});
});
});
});
},
},
// 将坐标转换封装为返回 Promise 的函数
convertCoordinate(item) {
item = item.split(",")
return new Promise((resolve) => {
AMap.invoke('Convertor', [AMap.invoke('Point', item[0], item[1])], 3, 5, res => {
const convertedPoint = res.points.length ? res.points[0] : item;
resolve(convertedPoint);
});
});
},
// 区域查车
// 区域查车
async getAreaLocation() {
async getAreaLocation() {
let _this = this;
let _this = this;
let params = this.getParams();
let params = this.getParams();
let _options = this.$route.query;
let _options = this.$route.query;
console.log(_options);
if (!_this.rectangle) {
if (!_this.rectangle) {
showToast({
showToast({
message: "请先划定区域",
message: "请先划定区域",
...
@@ -596,6 +604,14 @@ export default {
...
@@ -596,6 +604,14 @@ export default {
_this.loading = true;
_this.loading = true;
delete params.paths;
delete params.paths;
let left = await this.convertCoordinate(params.leftLngLat)
let right = await this.convertCoordinate(params.rightLngLat)
params.leftLngLat = `
$
{
left
.
lng
}
,
${
left
.
lat
}
`;
params.rightLngLat = `
$
{
right
.
lng
}
,
${
right
.
lat
}
`;
let res = await GER_REGIONAL_SEARCH(params);
let res = await GER_REGIONAL_SEARCH(params);
console.log(res, "res");
console.log(res, "res");
_this.loading = false;
_this.loading = false;
...
...
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