From 0dd273d72cf159a47006a63eb8ac85a1c9abea47 Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期二, 13 十二月 2022 21:12:55 +0800
Subject: [PATCH] 地图
---
src/views/intelligentPatrol/studyJudge/index.vue | 20 +++++++++++++++-----
src/components/map/index.vue | 1 +
src/components/dispatch/index.vue | 2 +-
3 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/src/components/dispatch/index.vue b/src/components/dispatch/index.vue
index 9f284e1..491d0dc 100644
--- a/src/components/dispatch/index.vue
+++ b/src/components/dispatch/index.vue
@@ -107,7 +107,7 @@
</div>
</el-form>
<div class="map">
- <!-- <MyMap></MyMap> -->
+ <MyMap></MyMap>
</div>
<div class="footer">
<el-button type="primary" @click="handleDispatch">纭畾</el-button>
diff --git a/src/components/map/index.vue b/src/components/map/index.vue
index 4a6f839..3f4d905 100644
--- a/src/components/map/index.vue
+++ b/src/components/map/index.vue
@@ -17,6 +17,7 @@
})
.then((AMap) => {
this.map = new AMap.Map("container");
+ this.map.setZoomAndCenter(15,['119.27179890', '28.59027084']);
})
.catch((e) => {
console.log(e);
diff --git a/src/views/intelligentPatrol/studyJudge/index.vue b/src/views/intelligentPatrol/studyJudge/index.vue
index 03bad9f..c71e937 100644
--- a/src/views/intelligentPatrol/studyJudge/index.vue
+++ b/src/views/intelligentPatrol/studyJudge/index.vue
@@ -41,6 +41,9 @@
</div>
</div>
<div class="sjm-content-center">
+ <div class="map">
+ <MyMap></MyMap>
+ </div>
<!-- <iframe src="https://183.245.159.161:8282/OneMap/index.html#/OneMap?code=2&clientVersion=&skin=white&locale=zh&otherAuthor=allowable"></iframe> -->
</div>
<div class="sjm-content-right">
@@ -185,8 +188,10 @@
import { validateCarNum } from "@/utils/validate";
import MyDispatch from "@/components/dispatch";
+import MyMap from "@/components/map";
+
export default {
- components: { MyDispatch },
+ components: { MyDispatch, MyMap },
created() {
this.getInspectionData();
this.initEventParams();
@@ -221,8 +226,8 @@
},
mounted() {
this.timer = setInterval(() => {
- setTimeout(this.getInspectionData, 0)
- }, 1000*10)
+ setTimeout(this.getInspectionData, 0);
+ }, 1000 * 10);
},
data() {
const validateCarNumber = (rule, value, callback) => {
@@ -237,7 +242,7 @@
}
};
return {
- timer:null,
+ timer: null,
countData: {
study: 0,
review: 0,
@@ -569,7 +574,7 @@
beforeDestroy() {
clearInterval(this.timer);
this.timer = null;
- }
+ },
};
</script>
@@ -658,4 +663,9 @@
color: #4b9bb7;
}
}
+
+.map {
+ height: 488px;
+ min-width: 460px;
+}
</style>
--
Gitblit v1.8.0